Splitting data in yearly quarters

juleshsol

New Member
Joined
Jul 24, 2013
Messages
15
Hi,

I have a large data set which include a date on each line. This ranges back to 2009. I need a formula which can identify which quarter each line fits into ie: date is 1/12/2011 - should read 'Q4 2011'

I have come up with a long winded formula of:

=YEAR(K173)&IF(MONTH(K173)<=3,"Q1",IF(AND(MONTH(K173)>3,MONTH(K173)<=6),"Q2",IF(AND(MONTH(K173)>6,MONTH(K173)<=9),"Q3","Q4")))

But is there a more efficient formula I could use?

Thank you
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Excel 2010
AB
2014 Q1
2014 Q1
2014 Q1
2014 Q2
2014 Q2
2014 Q2
2014 Q3
2014 Q3
2014 Q3
2014 Q4
2014 Q4
2014 Q4

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]01/01/14[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]01/02/14[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]01/03/14[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]01/04/14[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]01/05/14[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]01/06/14[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]01/07/14[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]01/08/14[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]01/09/14[/TD]

[TD="align: center"]10[/TD]
[TD="align: right"]01/10/14[/TD]

[TD="align: center"]11[/TD]
[TD="align: right"]01/11/14[/TD]

[TD="align: center"]12[/TD]
[TD="align: right"]01/12/14[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B1[/TH]
[TD="align: left"]=YEAR(A1)&" Q"&ROUNDUP(MONTH(A1)/3,0)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]


Misread your question, updated:


Excel 2010
AB
101/01/14Q1 2014
201/02/14Q1 2014
301/03/14Q1 2014
401/04/14Q2 2014
501/05/14Q2 2014
601/06/14Q2 2014
701/07/14Q3 2014
801/08/14Q3 2014
901/09/14Q3 2014
1001/10/14Q4 2014
1101/11/14Q4 2014
1201/12/14Q4 2014
Sheet1
Cell Formulas
RangeFormula
B1="Q"&ROUNDUP(MONTH(A1)/3,0)&" "&YEAR(A1)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top