Use the IF function to test a condition and return one value if TRUE and another if FALSE
Syntax: `=IF(logical_test, value_if_true, value_if_false)`
Example: `=IF(A1>10,”Yes”,”No”)`
Enter the formula in a cell and press Enter
Replace `logical_test` with the condition you want to check
Replace `value_if_true` with the result if the condition is met
Replace `value_if_false` with the result if the condition is not met
Use cell references, numbers, text, or formulas as arguments
Nest IF functions to test multiple conditions
Example of nested IF: `=IF(A1>90,”A”,IF(A1>80,”B”,”C”))`
Combine IF with AND or OR for multiple criteria
Example with AND: `=IF(AND(A1>10,B1<5),"Pass","Fail")`
Example with OR: `=IF(OR(A1>10,B1<5),"Pass","Fail")`
Use IF with blank results by putting `””` as the return value
Example: `=IF(A1=””,””,A1*2)`
Copy the IF formula down or across to apply it to other cells
Use IFERROR with IF when needed to handle errors
Example: `=IFERROR(IF(A1>10,”Yes”,”No”),”Error”)`
