Automatically Change Month formula.

Dandelion3

New Member
Joined
Dec 6, 2023
Messages
23
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
1719951902203.png


Hi everyone,

Is there a formula to automatically change the months. For example, in the snippet attached JUL is the current reporting month & there's also forecast data for the next 3 months off to the right. I have a data validation setup on another tab for the current reporting to automatcally change when a month is selected from the drop down. I also want the trailing 3 months to change as the current month changes. If I select AUG for the current month, I want the next 3 to automatically update to SEP, OCT, NOV.

Also, I would like to keep the data in the file for each month to be able to flip back & forth between months to review the data in one file instead of having a different file each month.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Be sure the "JUL" is an actual date, formatted as MMM.
Book1
ABCDE
12024-07-01
2JulVarianceAugSepOct
3
Sheet2
Cell Formulas
RangeFormula
A2A2=A1
C2:E2C2=EDATE(A2,SEQUENCE(,3))
Dynamic array formulas.


If you must use text with a drop down, assuming you always want year in 2024:
Book1
ABCDE
4
5AugSepOctNov
6
7drop down
8Jan
9Feb
10Mar
11Apr
12May
13Jun
14Jul
15Aug
16Sep
17Oct
18Nov
19Dec
Sheet2
Cell Formulas
RangeFormula
C5:E5C5=EDATE(DATE(2024,MATCH(A5,$A$8:$A$19,0),1),SEQUENCE(,3))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
A5List=$A$8:$A$19
 
Last edited:
Upvote 0
Be sure the "JUL" is an actual date, formatted as MMM.
Book1
ABCDE
12024-07-01
2JulVarianceAugSepOct
3
Sheet2
Cell Formulas
RangeFormula
A2A2=A1
C2:E2C2=EDATE(A2,SEQUENCE(,3))
Dynamic array formulas.
Thank you so much for the quick response; however, I got a SPILL error when I used the provided formula
 
Upvote 0
then you're pasting the formulas in areas that have adjacent cells. Clear out cells s D3 and E3, and D6 and E6.

Paste the mini sheet range in a brand new worksheet first, just so you see how it works.

(If you edited the formula I gave at all, please post it).
 
Upvote 0
Be sure the "JUL" is an actual date, formatted as MMM.
Book1
ABCDE
12024-07-01
2JulVarianceAugSepOct
3
Sheet2
Cell Formulas
RangeFormula
A2A2=A1
C2:E2C2=EDATE(A2,SEQUENCE(,3))
Dynamic array formulas.


If you must use text with a drop down, assuming you always want year in 2024:
Book1
ABCDE
4
5AugSepOctNov
6
7drop down
8Jan
9Feb
10Mar
11Apr
12May
13Jun
14Jul
15Aug
16Sep
17Oct
18Nov
19Dec
Sheet2
Cell Formulas
RangeFormula
C5:E5C5=EDATE(DATE(2024,MATCH(A5,$A$8:$A$19,0),1),SEQUENCE(,3))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
A5List=$A$8:$A$19
Got it. Thank you
 
Upvote 0
For only 3, you could drop the SEQUENCE function call.

=EOMONTH(A2,{1,2,3})
 
Upvote 0
If you're pulling from a dropdown and just have the text like Jul, you could do this:
=EOMONTH(A2&"01",{1,2,3})

Book1
ABCDE
2DecVarianceJanFebMar
Sheet1
Cell Formulas
RangeFormula
C2:E2C2=EOMONTH(A2&"01",{1,2,3})
Dynamic array formulas.
 
Upvote 0
then you're pasting the formulas in areas that have adjacent cells. Clear out cells s D3 and E3, and D6 and E6.

Paste the mini sheet range in a brand new worksheet first, just so you see how it works.

(If you edited the formula I gave at all, please post it).
Can I use the same formula if the source date changes? Say I want the report date to be the date of a meeting or a week ending date, is there something different I should do? Right now it only works if the date is the first of the month. If that changes, my data errors out. What I'm building is a weekly sales forecast dashboard.
 
Upvote 0
If you're pulling from a dropdown and just have the text like Jul, you could do this:
=EOMONTH(A2&"01",{1,2,3})

Book1
ABCDE
2DecVarianceJanFebMar
Sheet1
Cell Formulas
RangeFormula
C2:E2C2=EOMONTH(A2&"01",{1,2,3})
Dynamic array formulas.
Can I use the same formula if the source date changes? Say I want the report date to be the date of a meeting or a week ending date, is there something different I should do? Right now it only works if the date is the first of the month. If that changes, my data errors out. What I'm building is a weekly sales forecast dashboard.
 
Upvote 0
What do you mean if it's the first of the month? That formula literally only referenced the text Jul or Dec or whatever.
Can you post a sample of what you want and expected results?
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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