How to use the IF function (combined with the AND, OR, and NOT functions) in Excel to make logical comparisons between given values.