Return text between dates challenge

volpi2

New Member
Joined
Feb 11, 2018
Messages
2
Does anyone know how to calculate quarters in excel from a beg and end date where i am looking to seperate for Q1,Q2,Q3,Q4,Full Year?

The challenge is the quarters fall between a specific range and not the usual Jan 1 to Mar 31. Every year has a different date range for Q1,Q2,etc...Then we have another challenge where we need to know if Full Year when the end date is anytime in December and Start date is anytime in January.

Hope someone is smarter than me to figure out this formula.

Example
Year 2017
Q1: Jan 1, 2017 to Mar 24, 2017
Q2: Mar 25, 2017 to June 15, 2017
Q3: June 16,2017 to Sept 24, 2017
Q4: Sept 25,2017 to Dec 31, 2017
Full Year: Jan 1-31 to Dec 1-31,2017
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Welcome to the forum.

The simplest way is to create a reference table of threshold dates and corresponding quarters, and then use a lookup formula to retrieve the correct quarter for each date.

Copy B7 down as necessary.

ABCDE
q1
q2
q3
q4
q1
q2
q3
q4
q1
q2
etcetera

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]6[/TD]
[TD="bgcolor: #DDEBF7"]example[/TD]
[TD="bgcolor: #DDEBF7"]Q[/TD]
[TD="align: right"][/TD]
[TD="bgcolor: #FCE4D6"]threshold[/TD]
[TD="bgcolor: #FCE4D6"]quarter[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]2/13/17[/TD]
[TD="bgcolor: #A9D08E"]q1[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1/01/17[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]4/16/17[/TD]
[TD="bgcolor: #A9D08E"]q2[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/25/17[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]8/15/17[/TD]
[TD="bgcolor: #A9D08E"]q3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]6/16/17[/TD]

[TD="align: center"]10[/TD]
[TD="align: right"]9/29/18[/TD]
[TD="bgcolor: #A9D08E"]q3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]9/25/17[/TD]

[TD="align: center"]11[/TD]
[TD="align: right"]9/30/18[/TD]
[TD="bgcolor: #A9D08E"]q4[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1/01/18[/TD]

[TD="align: center"]12[/TD]
[TD="align: right"]1/26/19[/TD]
[TD="bgcolor: #A9D08E"]q1[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/28/17[/TD]

[TD="align: center"]13[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]6/22/18[/TD]

[TD="align: center"]14[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]9/30/18[/TD]

[TD="align: center"]15[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]12/28/18[/TD]

[TD="align: center"]16[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/21/19[/TD]

[TD="align: center"]17[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]

</tbody>
Sheet17

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B7[/TH]
[TD="align: left"]=VLOOKUP(A7,$D$7:$E$16,2,1)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Welcome to the forum.

The simplest way is to create a reference table of threshold dates and corresponding quarters, and then use a lookup formula to retrieve the correct quarter for each date.

Copy B7 down as necessary.

ABCDE
q1
q2
q3
q4
q1
q2
q3
q4
q1
q2
etcetera

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]6[/TD]
[TD="bgcolor: #DDEBF7"]example[/TD]
[TD="bgcolor: #DDEBF7"]Q[/TD]
[TD="align: right"][/TD]
[TD="bgcolor: #FCE4D6"]threshold[/TD]
[TD="bgcolor: #FCE4D6"]quarter[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]2/13/17[/TD]
[TD="bgcolor: #A9D08E"]q1[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1/01/17[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]4/16/17[/TD]
[TD="bgcolor: #A9D08E"]q2[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/25/17[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]8/15/17[/TD]
[TD="bgcolor: #A9D08E"]q3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]6/16/17[/TD]

[TD="align: center"]10[/TD]
[TD="align: right"]9/29/18[/TD]
[TD="bgcolor: #A9D08E"]q3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]9/25/17[/TD]

[TD="align: center"]11[/TD]
[TD="align: right"]9/30/18[/TD]
[TD="bgcolor: #A9D08E"]q4[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1/01/18[/TD]

[TD="align: center"]12[/TD]
[TD="align: right"]1/26/19[/TD]
[TD="bgcolor: #A9D08E"]q1[/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/28/17[/TD]

[TD="align: center"]13[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]6/22/18[/TD]

[TD="align: center"]14[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]9/30/18[/TD]

[TD="align: center"]15[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]12/28/18[/TD]

[TD="align: center"]16[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]3/21/19[/TD]

[TD="align: center"]17[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]

</tbody>
Sheet17

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B7[/TH]
[TD="align: left"]=VLOOKUP(A7,$D$7:$E$16,2,1)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Thank you, i will just need to create another column for dates that fall between full year.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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