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.
RefStart dateEnd DateQtr
000126/10/201525/01/2017Q1
0001
26/01/2016

<tbody>
</tbody><colgroup><col></colgroup>
25/04/2017Q2
0001
26/04/2016

<tbody>
</tbody><colgroup><col></colgroup>
25/07/2017Q3
0001
26/07/2016

<tbody>
</tbody><colgroup><col></colgroup>
25/10/2017Q4
000126/10/201525/01/2016Q1
0001
26/01/2016

<tbody>
</tbody><colgroup><col></colgroup>
25/04/2016Q2
000230/10/201629/01/2017Q1
000230/01/201729/04/2017Q2
000230/04/201729/07/2017Q3
000326/06/201527/09/2015Q1
000328/09/201527/12/2015Q2
000328/12/201527/03/2016Q3
000328/03/201627/05/2016Q4
000420/01/201519/04/2015Q1

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

FormR

MrExcel MVP
Joined
Aug 18, 2011
Messages
6,464
Office Version
  1. 365
Platform
  1. Windows
Hi, here is one option you can try:

<b>Excel 2013/2016</b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th><th>D</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style=";">Ref</td><td style=";">Start date</td><td style=";">End Date</td><td style=";">Qtr</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style="text-align: right;;">0001</td><td style="text-align: right;;">26/10/2015</td><td style="text-align: right;;">25/01/2017</td><td style="background-color: #FFFF00;;">Q1</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style="text-align: right;;">0001</td><td style="text-align: right;;">26/01/2016</td><td style="text-align: right;;">25/04/2017</td><td style=";">Q2</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style="text-align: right;;">0001</td><td style="text-align: right;;">26/04/2016</td><td style="text-align: right;;">25/07/2017</td><td style=";">Q3</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style="text-align: right;;">0001</td><td style="text-align: right;;">26/07/2016</td><td style="text-align: right;;">25/10/2017</td><td style=";">Q4</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style="text-align: right;;">0001</td><td style="text-align: right;;">26/10/2015</td><td style="text-align: right;;">25/01/2016</td><td style=";">Q1</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">7</td><td style="text-align: right;;">0001</td><td style="text-align: right;;">26/01/2016</td><td style="text-align: right;;">25/04/2016</td><td style=";">Q2</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">8</td><td style="text-align: right;;">0002</td><td style="text-align: right;;">30/10/2016</td><td style="text-align: right;;">29/01/2017</td><td style=";">Q1</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">9</td><td style="text-align: right;;">0002</td><td style="text-align: right;;">30/01/2017</td><td style="text-align: right;;">29/04/2017</td><td style=";">Q2</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">10</td><td style="text-align: right;;">0002</td><td style="text-align: right;;">30/04/2017</td><td style="text-align: right;;">29/07/2017</td><td style=";">Q3</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">11</td><td style="text-align: right;;">0003</td><td style="text-align: right;;">26/06/2015</td><td style="text-align: right;;">27/09/2015</td><td style=";">Q1</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">12</td><td style="text-align: right;;">0003</td><td style="text-align: right;;">28/09/2015</td><td style="text-align: right;;">27/12/2015</td><td style=";">Q2</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">13</td><td style="text-align: right;;">0003</td><td style="text-align: right;;">28/12/2015</td><td style="text-align: right;;">27/03/2016</td><td style=";">Q3</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">14</td><td style="text-align: right;;">0003</td><td style="text-align: right;;">28/03/2016</td><td style="text-align: right;;">27/05/2016</td><td style=";">Q4</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">15</td><td style="text-align: right;;">0004</td><td style="text-align: right;;">20/01/2015</td><td style="text-align: right;;">19/04/2015</td><td style=";">Q1</td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">D2</th><td style="text-align:left">=IF(<font color="Blue">A2<>A1,"Q1","Q"&IF(<font color="Red">RIGHT(<font color="Green">D1</font>)="4","1",RIGHT(<font color="Green">D1</font>)+1</font>)</font>)</td></tr></tbody></table></td></tr></table><br />
 

Vinoth_Shob

New Member
Joined
Dec 11, 2017
Messages
30
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.
RefStart dateEnd DateQtr
000126/10/201525/01/2017Q1
0001
26/01/2016

<tbody>
</tbody>
25/04/2017Q2
0001
26/04/2016

<tbody>
</tbody>
25/07/2017Q3
0001
26/07/2016

<tbody>
</tbody>
25/10/2017Q4
000126/10/201525/01/2016Q1
0001
26/01/2016

<tbody>
</tbody>
25/04/2016Q2
000230/10/201629/01/2017Q1
000230/01/201729/04/2017Q2
000230/04/201729/07/2017Q3
000326/06/201527/09/2015Q1
000328/09/201527/12/2015Q2
000328/12/201527/03/2016Q3
000328/03/201627/05/2016Q4
000420/01/201519/04/2015Q1

<tbody>
</tbody>
 

Watch MrExcel Video

Forum statistics

Threads
1,122,216
Messages
5,594,886
Members
413,947
Latest member
gizmolucy

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
Top