The IF function works on a conditional statement. It will return either a TRUE or a FALSE.
Note that the formula is as follows:
=IF(logic test, [value if true], [value if false])
The pair of square brackets means that the portion is optional (standard Excel convention) and not putting an input there will result in TRUE/FALSE as the answer.
E.G.: =IF(A3>B3), will return TRUE if the value in cell A3 is larger than the value in cell B3 and FALSE the value in cell A3 is smaller than the value in cell B3.
Inputting the formula would be as follows:
Logic test: specify the T/F Condition
Value if True: If the Condition is True, what formula do you want? (if you want text, you’ll have to enclose it in “”)
Value if False: If the Condition is False,what formula do you want? (if you want text, you’ll have to enclose it in “”)
E.G.: =IF(A3>B3,”A3 is Larger”,”A3 is Smaller”), will return “A3 is Larger” instead of TRUE and “A3 is Smaller” instead of FALSE.
Here’s a link for a more detailed explanation.