In this tutorial, you will learn how to get quarter from date in Excel. To be able to calculate a quarter, you will have to get familiar with MONTH and ROUNDUP functions. The MONTH function returns a month from a date, while ROUNDUP function rounds a ratio.
Get quarter from date
Let’s first look at MONTH function definition. This function returns a month of a selected date. For January, it will return 1, for February 2, for March 3, etc. The only parameter of the function MONTH is a date for which we want to get a month.
ROUNDUP function rounds a number to a specific number of decimal digits. The first parameter of the function is Number which we want to round up – in our case that will be a month of a date divided by 3 (because a quarter has 3 months). The second parameter is Number of digits – on which we want to round a decimal number – in our case, it will be 0, so we can get a quarter.
In our example, we have dates in column B (“Date”), while in column C we want to get a quarter from a date (“Quarter from date”). Let’s look at the formula:
Figure 1. Get quarter from date
The MONTH(B3) will return 6, as the date in the cell B3 is in month June. The number 6 will be number parameter for ROUNDUP function, so we will round up 2 (6/3) on 0 decimals. This is 2 – the second quarter (cell C3).
If you look at the second row (Cell B4), you will see that function MONTH(B4) will return 2, as the date in the cell B4 is in month February. The ROUNDUP function will take 0.66667 as number parameter (2/3) and round it up on 0 decimals. As this function rounds a number to a greater value, we will get 1 in the cell C4 – the first quarter.