A single logical test is rarely enough in real life. You want customers who are over 35 AND earn more than 50,000, or people who are married OR in a civil partnership. This is the job of the AND and OR functions. They combine several logical tests and still return one answer: TRUE or FALSE. Then this answer can go inside IF, COUNTIFS or FILTER.
The following exercise shows you how to combine conditions without making mistakes.
What you will practice in this exercise
You answer 10 questions on a list of people (gender, age, income, status, children). For each question, you write one logical test in column H:
- Is the person 35 or older? (simple test)
- 35 or older AND income of 50,000 or more (AND, 2 conditions)
- A man AND income above 60,000 (AND with text and number)
- Married OR in a civil partnership (OR function)
- A single woman with no children (AND, 3 conditions)
- Between 30 and 40 years old inclusive (AND on the same column)
- A woman under 35, single OR divorced (AND + OR together)
Practice with exercises
AND/OR — Combined logical tests
Select customers on several criteria at once by combining AND and OR.
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.