Excel AND Practice Question: Write All passed in E2 if every mark in B2:B6 is 40 or more, otherwise Someone…
The question
Write All passed in E2 if every mark in B2:B6 is 40 or more, otherwise Someone failed.
The data
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Name | Marks | Result | ||
| 2 | Rahul | 72 | ? | ||
| 3 | Priya | 65 | |||
| 4 | Amit | 40 | |||
| 5 | Neha | 58 | |||
| 6 | Karan | 91 |
The yellow cell is where your answer goes.
Show answer
Answer in E2: All passed
How it works
Explanation: AND can check a whole range at once. It is TRUE only when every mark passes the test.
Syntax: =IF(AND(B2:B6>=40),"All passed","Someone failed")
The lowest mark is 40, which is allowed, so every mark passes and the result is All passed.
Try it yourself in the live sheet
Type your formula in the highlighted cell and get instant feedback. Free, no Excel install needed.
Try this question in the live sheet →AND syntax
=AND(logical1, [logical2], ...)
Returns TRUE only if every condition given is true. AND is used to build decision rules directly into a spreadsheet instead of manually judging each row. Full AND guide.
More AND practice questions
- A student passes only if both subject marks are 50 or more. Write Pass or Fail in D2 to…
- A person is eligible if the age is 18 or more and the city is Pune. Write Eligible or No…
- Give a Bonus only if the sales are 100000 or more and the rating is 90 or more,…
- Write Ship if the status is Paid, the quantity is above 0 and the stock is In stock.…
- Write Average if the marks are between 40 and 60 (both included), otherwise Other. Put…
- Multiply price and quantity only if both are valid numbers and the quantity is above 0.…
- A code is valid if it starts with HR, has exactly 7 characters and ends with 4 digits.…
- Years of service are in B2:B7 and the rating (1 to 5) in C2:C7. An employee gets a bonus…
All practice questions · Excel exercises · Interview prep · Cheat sheet