formula shows quarters

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Formula that shows Quarters 1-4 in Year

Formula that shows Quarters 1-4 in Year

resolvedResolved · Medium Priority · Version 2010

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

RE: Formula that shows Quarters 1-4 in Year

That's explained it perfectly - Thanks Gary.


 

Excel tip:

Reconciling a list to correspond with another

May have a list that needs to make but on another sheet one list seems to be out, eg. product list one sheet contains all product and inventory data, while the other contains pricing data. Both need to match with all products but there is more products in one list than the other. To find the disparaging product compare data in the two columns that need to match Make sure that order the same way.
Create another column in the sheet that has the most items and type in the first cell


=Exact(text1,text2) text1 being the cell that you want compared with text2 cell reference. Drag to filldown and your first false will give you for first cells that does not match. Correct insert the row with data in other sheet and continue the process until all the data returns true. Delete the column inserted.

View all Excel hints and tips


Server loaded in 0.05 secs.