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]
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]