How to calculate the quarter for a given date in Google Sheets
Quarterly reporting is important for many businesses. While most spreadsheets can extract the day, date, month or year from a date with dedicated functions, none of them have a built-in quarter() function . In this article we will show you how you can easily get the quarter of the year from a date. 1. The month() function The month() function in Google Sheets gives you the month number from a date: if your cell A2 contains Sep-30 2017 or 9/30/2017, month(A2) will show "9". 2. A little math There are four quarters in a year with three months each. Month 1 is in Q1, month 5 is in Q2, month 6 is also in Q2, while month 7 is in Q3. The logic is simple enough that we want to automate this with some math. Here is the trick : if we know the month and divide the month by 3, we are almost there : We can see that March, June and December are in the right quarter number but for other months, the floating numbers are cause for concern. Well, not for long. 3. Roundin...