Cellgrids Cellgrids
Home › Practice questions › IFS › Question 8

Excel IFS Practice Question: Write the quarter for each month name: Jan to Mar is Q1, Apr to Jun is Q2, Jul…

By Rinkesh Shah, founder of Cellgrids.

The question

Write the quarter for each month name: Jan to Mar is Q1, Apr to Jun is Q2, Jul to Sep is Q3, otherwise Q4. Put it in B2 to B5.

The data

AB
1MonthQuarter
2Feb?
3May?
4Sep?
5Dec?

The yellow cells are where your answer goes.

Show answer

Expected results:

  • B2 = Q1
  • B3 = Q2
  • B4 = Q3
  • B5 = Q4

How it works

Explanation: Each condition uses OR to cover the three months of a quarter, and TRUE catches the last quarter.
Syntax: =IFS(OR(A2="Jan",A2="Feb",A2="Mar"),"Q1",OR(A2="Apr",A2="May",A2="Jun"),"Q2",OR(A2="Jul",A2="Aug",A2="Sep"),"Q3",TRUE,"Q4")
Feb is Q1. May is Q2. Sep is Q3. Dec matches none of the first three, so Q4.

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 →

IFS syntax

=IFS(logical_test1, value1, [logical_test2, value2], ...)

Checks multiple conditions in order and returns the value for the first one that's true. IFS is used to build decision rules directly into a spreadsheet instead of manually judging each row. Full IFS guide.

More IFS practice questions

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