For example use IF and AND to test if a value is between two numbers. In the example shown above we want to assign either Pass or Fail based on a test score. To evaluate two or more conditions and return one result if any of the conditions is TRUE and another result if all the conditions are FALSE embed the OR function in the logical test of IF.
Use conditional formatting to make cells automatically change color based on data.
It can also be used to evaluate errors. In this example the formula in cell D2 says. The dialog box takes care of the syntax such as placing comma separators between arguments and surrounding text entries in quotation marks. IF AND in Excel Formula.