Cellgrids Cellgrids
Home › Practice questions › OR › Question 2

Excel OR Practice Question: Write Out of range if the age is below 18 or above 60, otherwise OK. Put it in…

By Rinkesh Shah, founder of Cellgrids.

The question

Write Out of range if the age is below 18 or above 60, otherwise OK. Put it in C2 to C4.

The data

ABC
1NameAgeCheck
2Rahul25?
3Priya16?
4Amit65?

The yellow cells are where your answer goes.

Show answer

Expected results:

  • C2 = OK
  • C3 = Out of range
  • C4 = Out of range

How it works

Explanation: OR checks both ends. One true condition is enough to give Out of range.
Syntax: =IF(OR(B2<18,B2>60),"Out of range","OK")
25 is fine: OK. 16 is below 18: Out of range. 65 is above 60: Out of range.

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 →

OR syntax

=OR(logical1, [logical2], ...)

Returns TRUE if at least one condition given is true. OR is used to build decision rules directly into a spreadsheet instead of manually judging each row. Full OR guide.

More OR practice questions

All practice questions · Excel exercises · Interview prep · Cheat sheet