Many Excel users think a logical test and the IF function are the same thing. They are not. A logical test is a simple question that Excel answers with TRUE or FALSE, like =C2<2000. The first argument of the IF function is just a logical test. And you can write a logical test in any cell, without any function. The same tests are also the heart of nested IF, COUNTIF, SUMIF and many other functions.
The following exercise shows you why building good logical tests is so important in Excel.
What you will practice in this exercise
You answer 7 questions, one formula per question. For each question, you create a logical test to check if the information about your customers is filled in, and filled in correctly:
- Is the email missing? (empty cell)
- Is the customer a man? (equal to a text)
- Is the gender different from “Male”? (the <> operator)
- Is the salary below 2,000? (number comparison)
- Is the postal code 69001? (text that looks like a number)
- Does the postal code start with 69? (LEFT)
- Does the email end with @xyz.com? (RIGHT)
Practice with exercises
Related articles
All the exercises in this series are based on real cases found on Excel forums. Each one answers a question that Excel users really ask.