Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Determining Business Quarters from Dates.
by Allen Wyatt
(last updated September 5, 2015)
Robert is looking for a way to determine the business quarter in which a particular date falls. For example, if cell A1 has 2/15/15, he would want cell B1 to contain a formula that returned Q1-15. Similarly, if cell A1 has 8/1/14, he would want cell B1 to return Q3-14.
There are literally dozens of ways that you can determine a straight business quarter from a date. A few of these methods are worth examining, and they are easily modified to adapt to any specific needs. What is assumed here is that you really want to use a self-contained formula, rather than using a lookup table or a VBA macro. Both of those approaches will work just fine, but it is assumed that the simple formulas will work best for your purposes.
The key factor in determining the business quarter is to look at the month of the date. If your business quarters follow calendar quarters you could use a simple formula, such as this:
="Q" & INT((MONTH(A1)-1)/3)+1 & TEXT(A1,"-yy")
Another approach is to use the CHOOSE function. This works well if your business quarters begin in the same months as calendar quarters, but the quarter numbers don't correspond. For instance, the first quarter of your business year may begin in April. Consider the following, which works for the scenario of April being the start of the first quarter:
If your business quarters don't begin in January, April, July, or October, then you can use the fuller CHOOSE-based approach:
=CHOOSE(MONTH(A1),"Q1","Q1","Q1","Q2","Q2","Q2", "Q3","Q3","Q3","Q4","Q4","Q4") & & TEXT(A1,"-yy")
This is a single formula; it is rather long, providing a choice for each of the 12 months in the year. All you need to do is change which quarter corresponds to which month. (As shown, the quarters correspond to calendar quarters.)
Another way is to rely on IF statements to determine the quarter. This is done in the following manner:
=IF(MONTH(A1) <= 3, "Q1", IF(MONTH(A1) <= 6, "Q2", IF(MONTH(A1) <= 9, "Q3", "Q4"))) & TEXT(A1,"-yy")
The IF statements check the month to see its relation to the various boundaries for the quarters (3, 6, and 9) and then assigns a proper quarter (Q1, Q2, Q3, or Q4) based on the result. A dash and the last two digits of the year is then appended to the quarter.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10634) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Determining Business Quarters from Dates.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Need to copy a range of dates and update them to a different year? Here are a number of ways to accomplish this task with ...Discover More
Want to convert an elapsed time, such as 8:37, to a decimal time, such as 8.62? If you know how Excel stores times ...Discover More
When doing data entry into a worksheet, you might want to enter dates without the need to type the separators that are ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.