The IF function is one of the most popular and useful functions in Excel. We use the IF function to ask Excel to test a condition and to return one value if the condition is met, and another value if the condition is not met.