looking for help with a formula...

fingermouse

Board Regular
Joined
Dec 13, 2013
Messages
117
Hi,

I'm sure excel can do this but not sure where to start.

Please refer to the table below. Basically, I need a formula in the 'qtr' column which will reset to 'Q1' any time the value of the reference number in the 'ref' column changes.

Any help much appreciated! Thanks, Cal.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Ref[/TD]
[TD]Start date[/TD]
[TD]End Date[/TD]
[TD]Qtr[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD]26/10/2015[/TD]
[TD]25/01/2017[/TD]
[TD]Q1[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD]26/01/2016[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD]25/04/2017[/TD]
[TD]Q2[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD]26/04/2016[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD]25/07/2017[/TD]
[TD]Q3[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD]26/07/2016[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD]25/10/2017[/TD]
[TD]Q4[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD]26/10/2015[/TD]
[TD]25/01/2016[/TD]
[TD]Q1[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD]26/01/2016[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[TD]25/04/2016[/TD]
[TD]Q2[/TD]
[/TR]
[TR]
[TD]0002[/TD]
[TD]30/10/2016[/TD]
[TD]29/01/2017[/TD]
[TD]Q1[/TD]
[/TR]
[TR]
[TD]0002[/TD]
[TD]30/01/2017[/TD]
[TD]29/04/2017[/TD]
[TD]Q2[/TD]
[/TR]
[TR]
[TD]0002[/TD]
[TD]30/04/2017[/TD]
[TD]29/07/2017[/TD]
[TD]Q3[/TD]
[/TR]
[TR]
[TD]0003[/TD]
[TD]26/06/2015[/TD]
[TD]27/09/2015[/TD]
[TD]Q1[/TD]
[/TR]
[TR]
[TD]0003[/TD]
[TD]28/09/2015[/TD]
[TD]27/12/2015[/TD]
[TD]Q2[/TD]
[/TR]
[TR]
[TD]0003[/TD]
[TD]28/12/2015[/TD]
[TD]27/03/2016[/TD]
[TD]Q3[/TD]
[/TR]
[TR]
[TD]0003[/TD]
[TD]28/03/2016[/TD]
[TD]27/05/2016[/TD]
[TD]Q4[/TD]
[/TR]
[TR]
[TD]0004[/TD]
[TD]20/01/2015[/TD]
[TD]19/04/2015[/TD]
[TD]Q1[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi, here is one option you can try:


Excel 2013/2016
ABCD
1RefStart dateEnd DateQtr
2000126/10/201525/01/2017Q1
3000126/01/201625/04/2017Q2
4000126/04/201625/07/2017Q3
5000126/07/201625/10/2017Q4
6000126/10/201525/01/2016Q1
7000126/01/201625/04/2016Q2
8000230/10/201629/01/2017Q1
9000230/01/201729/04/2017Q2
10000230/04/201729/07/2017Q3
11000326/06/201527/09/2015Q1
12000328/09/201527/12/2015Q2
13000328/12/201527/03/2016Q3
14000328/03/201627/05/2016Q4
15000420/01/201519/04/2015Q1
Sheet1
Cell Formulas
RangeFormula
D2=IF(A2<>A1,"Q1","Q"&IF(RIGHT(D1)="4","1",RIGHT(D1)+1))
 
Upvote 0
Please use this formula - CONCATENATE("Q" & ROUNDUP(MONTH(C2)/3,0))

Column C2 refers to end month date


Hi,

I'm sure excel can do this but not sure where to start.

Please refer to the table below. Basically, I need a formula in the 'qtr' column which will reset to 'Q1' any time the value of the reference number in the 'ref' column changes.

Any help much appreciated! Thanks, Cal.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Ref[/TD]
[TD]Start date[/TD]
[TD]End Date[/TD]
[TD]Qtr[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD]26/10/2015[/TD]
[TD]25/01/2017[/TD]
[TD]Q1[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD]26/01/2016[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]25/04/2017[/TD]
[TD]Q2[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD]26/04/2016[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]25/07/2017[/TD]
[TD]Q3[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD]26/07/2016[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]25/10/2017[/TD]
[TD]Q4[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD]26/10/2015[/TD]
[TD]25/01/2016[/TD]
[TD]Q1[/TD]
[/TR]
[TR]
[TD]0001[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD]26/01/2016[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]25/04/2016[/TD]
[TD]Q2[/TD]
[/TR]
[TR]
[TD]0002[/TD]
[TD]30/10/2016[/TD]
[TD]29/01/2017[/TD]
[TD]Q1[/TD]
[/TR]
[TR]
[TD]0002[/TD]
[TD]30/01/2017[/TD]
[TD]29/04/2017[/TD]
[TD]Q2[/TD]
[/TR]
[TR]
[TD]0002[/TD]
[TD]30/04/2017[/TD]
[TD]29/07/2017[/TD]
[TD]Q3[/TD]
[/TR]
[TR]
[TD]0003[/TD]
[TD]26/06/2015[/TD]
[TD]27/09/2015[/TD]
[TD]Q1[/TD]
[/TR]
[TR]
[TD]0003[/TD]
[TD]28/09/2015[/TD]
[TD]27/12/2015[/TD]
[TD]Q2[/TD]
[/TR]
[TR]
[TD]0003[/TD]
[TD]28/12/2015[/TD]
[TD]27/03/2016[/TD]
[TD]Q3[/TD]
[/TR]
[TR]
[TD]0003[/TD]
[TD]28/03/2016[/TD]
[TD]27/05/2016[/TD]
[TD]Q4[/TD]
[/TR]
[TR]
[TD]0004[/TD]
[TD]20/01/2015[/TD]
[TD]19/04/2015[/TD]
[TD]Q1[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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