List of months between and including 2 dates

cajunlaroux

New Member
Joined
Jun 16, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Need a formula for D3 that i can drag down that will list all the months, including the start and end month, from B3 and B4. Assume the only data you're given is B3 and B4. Once B3 and B4 are provided, D3 on down will either populate automatically OR you manually drag down D3 formula until the end date month is reached and everything else below is blank. Thank you kindly!

1707929215139.png
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
try:

In Cell D3.
Excel Formula:
=TEXT(
DATE(YEAR(B3),SEQUENCE(MONTH(B4)-MONTH(B3)+1,,MONTH(B3),1),1),
"mmmm")

If you want to retain the date values, just take out the TEXT function and format the cells as "mmmm".
(this won't work if you wrap around December, but you can update the formula to get that accomplished).
 
Upvote 1
Solution
Dates and Time 2024.xlsm
ABCD
1
2
301-04-24April
415-10-24May
5June
6July
7August
8September
9October
10
2b
Cell Formulas
RangeFormula
D3:D9D3=EDATE(B3,SEQUENCE(DATEDIF(B3,B4,"m")+1,,0))
Dynamic array formulas.
 
Upvote 0
Thank you! This worked perfectly!
You're welcome. The post by @Dave Patton is shorter, and more succinct and wraps around year end.
Here is a LET() statement version that also considers wrapping around year end.

Best Wishes.

Excel Formula:
=LET(
SD,B3,
Nyrs,YEAR(B4)-YEAR(B3),
SMn,MONTH(B3),
EMn,(Nyrs*12)+MONTH(B4),
NMns,EMn-SMn,
EDATE(SD,SEQUENCE(NMns+1,,0,1)))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,712
Messages
6,174,031
Members
452,542
Latest member
Bricklin

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