Displaying years and quarters between 2 dates

AnotherExcelGuy

New Member
Joined
Jul 8, 2019
Messages
13
Is there a way to automatically display the following example:

Enter start date - 2020-10-1
Enter end date - 2022-2-3

Display:

2020 - Q4
2021 - Q1
2021- Q2
2021- Q3
2021 - Q4
2022 - Q1
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
That was a fun challenge :). Try below formula. Thanks!

=UNIQUE(TEXT(B1+SEQUENCE(1+B2-B1,,0),"YYYY")&" - Q"&ROUNDUP(MONTH(B1+SEQUENCE(1+B2-B1,,0))/3,0))

Book2
AB
1Start Date:2020-10-01
2End Date:2022-02-03
3
42020 - Q4
52021 - Q1
62021 - Q2
72021 - Q3
82021 - Q4
92022 - Q1
Sheet1
Cell Formulas
RangeFormula
A4:A9A4=UNIQUE(TEXT(B1+SEQUENCE(1+B2-B1,,0),"YYYY")&" - Q"&ROUNDUP(MONTH(B1+SEQUENCE(1+B2-B1,,0))/3,0))
Dynamic array formulas.
 
Upvote 1
Solution
One way.

AEG
FG
5Start10/1/2020
6End2/3/2022
7
82020Q4
92021Q1
102021Q2
112021Q3
122021Q4
132022Q1
Sheet3
Cell Formulas
RangeFormula
F8:G13F8=LET(d,SEQUENCE(G6-G5,,G5),q,"Q"&ROUNDUP(MONTH(d)/3,0),y,YEAR(d),UNIQUE(HSTACK(y,q)))
Dynamic array formulas.
 
Upvote 1

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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