Cellgrids Cellgrids
Home › Practice questions › OR › Question 3

Excel OR Practice Question: Write West if the city is Pune or Mumbai, otherwise Other. Put it in C2 to C4.

By Rinkesh Shah, founder of Cellgrids.

The question

Write West if the city is Pune or Mumbai, otherwise Other. Put it in C2 to C4.

The data

ABC
1NameCityZone
2RahulPune?
3PriyaDelhi?
4AmitMumbai?

The yellow cells are where your answer goes.

Show answer

Expected results:

  • C2 = West
  • C3 = Other
  • C4 = West

How it works

Explanation: Either city makes the result West.
Syntax: =IF(OR(B2="Pune",B2="Mumbai"),"West","Other")
Pune is West. Delhi is Other. Mumbai is West.

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