Andrew has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Excel Advanced - For Power Users course
Excel Dashboards for Business Intelligence course
Formula that shows Quarters 1-4 in Year
I have found this formula on the internet which successfully answered my proble about calculating which quarter the date cell belongs too.
=INT((MONTH(A1)-1)/3)+1
(A1 = 01/01/2014)
My question is can someone explain how the formula itself is structured (how it works by breaking down each part of it).
I'll be grateful for any feedback.
Andy
RE: Formula that shows Quarters 1-4 in Year
Hi Andrew
Thanks for getting in touch. The two powerful parts of the formula are the MONTH and INT functions.
MONTH returns the month for a given date, in the form of a number. So =MONTH(01/05/2013) returns 5.
INT converts a number to an integer, i.e. a whole number. It doesn't round, it just chops off any spare decimal places.
In order, it does this:
1) evaluate the month of the given date
2) subtract 1 and divide by 3 (this converts it to 0, 1, 2 or 3)
3) convert to an integer
4) add 1 to turn it into 1, 2, 3 or 4
You can see this more clearly on your spreadsheet by highlighting a cell that contains this formula, going to the Formulas tab and clicking Evaluate Formula. Excel will then slowly step through the function for you.
Kind regards
Gary Fenn
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector