Introduction
The IF function helps you choose between two values based on a condition. It works like a simple question: if something is true, show one thing; if not, show another.
You want to check if a number is positive or negative and show a message.
You want to label people as 'Adult' or 'Minor' based on their age.
You want to give a discount only if the purchase amount is above a certain value.
You want to display 'Yes' or 'No' depending on whether a product is in stock.