EXPLANATION
This tutorial shows and explains how to calculate the next month based on the current month using Excel formulas or VBA.
This tutorial provides two Excel methods that can be applied to return the next month based on the current month. The first method uses a combination of the TEXT, EDATE and DAY functions whilst the second method uses the TEXT, EOMONTH and TODAY functions. The first method calculates the same date next month and then using the TEXT function with the «mmmm» criteria to return the month. The second method calculates the last date of the next month and then using the TEXT function with the «mmmm» criteria to return the month.
This tutorial provides one VBA method that can be applied to return the next month based on the current month.
FORMULA (first method)
=TEXT(EDATE(TODAY(),1),»mmmm»)
FORMULA (second method)
=TEXT(EOMONTH(TODAY(),1),»mmmm»)
One of the most commonly used formats in Microsoft Excel is dates. Over time, Excel has added some very cool features regarding dates. One such feature is to get the same date next month. We can do it using the EDATE function in Excel. In this tutorial, we will learn how to get same date next month in Excel.
Figure 1. Example of How to Get Same Date Next Month in Excel
Generic Formula
=EDATE(date,1)
Process
The EDATE function can generate same date next month. It uses two arguments: start_date and months. To get the same date in the future, we need to provide the date as start_date. We need to use 1. This will generate the same date next month.
Setting up Data
The following example contains some sample dates. They are in column A.
Figure 2. The Data Set
To find the same date next month:
- We need to go to cell B2.
- Next, we need to go to Formulas>Insert Function. In the search for a function box type EDATE and click Go.
Figure 3. Selecting the EDATE Function
- In the select a function box, we need to click on EDATE and press Ok.
- Next, we need to input the arguments. For the start_date we need to insert A2 and for months we need to type 1.
Figure 4. Setting the Arguments
- Lastly, we need to click OK. We need to drag the formula using the fill handle from cells B2 to B6.
Figure 5. The Function in Action
This will show the same date next month in column B.
Notes
We can also find the same date previous month. To find the same date previous month for the last example, we need to assign the formula =EDATE(A2,-1) to cell B2.
Figure 6. Get Same Date Previous Month
This will show the same date in the previous month in column B.
Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.
Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel 2010 Excel 2007 Excel for Mac 2011 Excel Starter 2010 More…Less
To get detailed information about a function, click its name in the first column.
Note: Version markers indicate the version of Excel a function was introduced. These functions aren’t available in earlier versions. For example, a version marker of 2013 indicates that this function is available in Excel 2013 and all later versions.
Function |
Description |
DATE function |
Returns the serial number of a particular date |
DATEDIF function |
Calculates the number of days, months, or years between two dates. This function is useful in formulas where you need to calculate an age. |
DATEVALUE function |
Converts a date in the form of text to a serial number |
DAY function |
Converts a serial number to a day of the month |
DAYS function |
Returns the number of days between two dates |
DAYS360 function |
Calculates the number of days between two dates based on a 360-day year |
EDATE function |
Returns the serial number of the date that is the indicated number of months before or after the start date |
EOMONTH function |
Returns the serial number of the last day of the month before or after a specified number of months |
HOUR function |
Converts a serial number to an hour |
ISOWEEKNUM function |
Returns the number of the ISO week number of the year for a given date |
MINUTE function |
Converts a serial number to a minute |
MONTH function |
Converts a serial number to a month |
NETWORKDAYS function |
Returns the number of whole workdays between two dates |
NETWORKDAYS.INTL function |
Returns the number of whole workdays between two dates using parameters to indicate which and how many days are weekend days |
NOW function |
Returns the serial number of the current date and time |
SECOND function |
Converts a serial number to a second |
TIME function |
Returns the serial number of a particular time |
TIMEVALUE function |
Converts a time in the form of text to a serial number |
TODAY function |
Returns the serial number of today’s date |
WEEKDAY function |
Converts a serial number to a day of the week |
WEEKNUM function |
Converts a serial number to a number representing where the week falls numerically with a year |
WORKDAY function |
Returns the serial number of the date before or after a specified number of workdays |
WORKDAY.INTL function |
Returns the serial number of the date before or after a specified number of workdays using parameters to indicate which and how many days are weekend days |
YEAR function |
Converts a serial number to a year |
YEARFRAC function |
Returns the year fraction representing the number of whole days between start_date and end_date |
Important: The calculated results of formulas and some Excel worksheet functions may differ slightly between a Windows PC using x86 or x86-64 architecture and a Windows RT PC using ARM architecture. Learn more about the differences.
Need more help?
-
#2
A2=A1 (formatted as «mmm»)
A3 = DATE(YEAR(A2),MONTH(A2)+1,1) (formatted as «mmm»)
-
#3
Also
A2: =A1
A3: =EOMONTH(A1,1)
both formatted as «mmmm»
-
#4
Seems to me from your A2 formula that you actually want the month as text, rather than a date just formatted that way? If so, perhaps this adaptation of PGC’s formula:
=TEXT(EOMONTH(A1,1),»mmmm»)
.. or if you have an older Excel version and don’t have Analysis ToolPak installed/activated:
=TEXT(A1-DAY(A1)+32,»mmmm»)
-
#5
Maybe this way:
<b>Excel 2007</b><table cellpadding=»2.5px» rules=»all» style=»;background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6″><colgroup><col width=»25px» style=»background-color: #E0E0F0″ /><col /></colgroup><thead><tr style=» background-color: #E0E0F0;text-align: center;color: #161120″><th></th><th>A</th></tr></thead><tbody><tr ><td style=»color: #161120;text-align: center;»>1</td><td style=»text-align: center;;»>8/7/2011</td></tr><tr ><td style=»color: #161120;text-align: center;»>2</td><td style=»text-align: center;;»>August</td></tr><tr ><td style=»color: #161120;text-align: center;»>3</td><td style=»text-align: center;;»>September</td></tr><tr ><td style=»color: #161120;text-align: center;»>4</td><td style=»text-align: center;;»>October</td></tr><tr ><td style=»color: #161120;text-align: center;»>5</td><td style=»text-align: center;;»>November</td></tr><tr ><td style=»color: #161120;text-align: center;»>6</td><td style=»text-align: center;;»>December</td></tr><tr ><td style=»color: #161120;text-align: center;»>7</td><td style=»text-align: right;;»></td></tr><tr ><td style=»color: #161120;text-align: center;»>8</td><td style=»text-align: center;;»>**************</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 #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120″>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: #FFFFFF» ><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: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6″><thead><tr style=» background-color: #E0E0F0;color: #161120″><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: #E0E0F0;color: #161120″>A2</th><td style=»text-align:left»>=TEXT(<font color=»Blue»>DATE(<font color=»Red»>YEAR(<font color=»Green»>A$1</font>),MONTH(<font color=»Green»>A$1</font>)+ROW(<font color=»Green»>A2</font>)-ROW(<font color=»Green»>A$2</font>),DAY(<font color=»Green»>A$1</font>)</font>),»mmmm»</font>)</td></tr></tbody></table></td></tr></table><br />
Markmzz
-
#6
=(MONTH(A2)+1)*29
Format as mmmm
-
#7
Yet another one…
=TEXT(EOMONTH(A1,1),»mmmm»)
Note that the EOMONTH function requires the Analysis ToolPak
add-in be installed if you’re using a version of Excel prior to
Excel 2007. If you enter the formula and get a #NAME?
error look in Excel help for the EOMONTH function. It’ll tell you
how to fix the problem.
-
#8
I’m pretty sure this non-Analysis-ToolPak formula works…
=TEXT(31*MONTH(A1)+1,»mmmm»)
-
#9
Yet another one…
=TEXT(EOMONTH(A1,1),»mmmm»)
Looks remarkably similar to one in post #4
-
#10
Have we done this one, yet?
=TEXT((A2&1)+31,»mmmm»)
assumes A2 has the month as text as per first post
06-10-2005, 09:05 PM
#1
A formula to show Next month
I looking for a fuction that show next month and not the current month. Cause
the formula I have show the current month which is «=TODAY()». So your help
will be appreciated.
06-10-2005, 10:05 PM
#2
Re: A formula to show Next month
On Fri, 10 Jun 2005 17:51:03 -0700, AndreL
<AndreL@discussions.microsoft.com> wrote:
>I looking for a fuction that show next month and not the current month. Cause
>the formula I have show the current month which is «=TODAY()». So your help
>will be appreciated.What do you mean by «next month»?
The month number?
=MOD(MONTH(TODAY()),12)+1
The first day of the next month?
=EOMONTH(TODAY(),0)+1
The last day of the next month?
=EOMONTH(TODAY(),1)
or something else?
—
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
«I feel a wave of morning sickness coming on, and I want to
be standing on your mother’s grave when it hits.»
06-10-2005, 10:05 PM
#3
Re: A formula to show Next month
The first one shows «Jun-00» and it shows it that way cause I have the fomat
of the cell setup for dates. And the date type as «Mar-01» And I look on the
Internet to find a way to do the next month from the current formula. What I
have is «Today () +31» and it show the next month form the current. Now will
that in any way not work for months that have either 31 or 30 days.
oh yea and … thank for you hel Stan The Man.
«Stan Brown» wrote:
> On Fri, 10 Jun 2005 17:51:03 -0700, AndreL
> <AndreL@discussions.microsoft.com> wrote:
>
> >I looking for a fuction that show next month and not the current month. Cause
> >the formula I have show the current month which is «=TODAY()». So your help
> >will be appreciated.
>
> What do you mean by «next month»?
>
> The month number?
>
> =MOD(MONTH(TODAY()),12)+1
>
> The first day of the next month?
>
> =EOMONTH(TODAY(),0)+1
>
> The last day of the next month?
>
> =EOMONTH(TODAY(),1)
>
> or something else?
>
> —
> Stan Brown, Oak Road Systems, Tompkins County, New York, USA
> http://OakRoadSystems.com/
> «I feel a wave of morning sickness coming on, and I want to
> be standing on your mother’s grave when it hits.»
>
06-10-2005, 11:05 PM
#4
Re: A formula to show Next month
On Fri, 10 Jun 2005 17:51:03 -0700, AndreL <AndreL@discussions.microsoft.com>
wrote:
>I looking for a fuction that show next month and not the current month. Cause
>the formula I have show the current month which is «=TODAY()». So your help
>will be appreciated.What do you mean by «next month».
With the date in A1:
The following formula will show the NAME of the next month:
=CHOOSE(MONTH(A1),»Feb»,»Mar»,»Apr»,»May»,»Jun»,»Jul»,»Aug»,»Sep»,»Oct»,»Nov»,»Dec»,»Jan»)
The following formula will add one month to the date, but not go past the last
day of the subsequent month.=edate(A1,1)
—————————
If the EDATE function is not available, and returns the #NAME? error, install
and load the Analysis ToolPak add-in.On the Tools menu, click Add-Ins.
In the Add-Ins available list, select the Analysis ToolPak box, and then click
OK.
If necessary, follow the instructions in the setup program.
——————————Or, without installing the ATP:
=DATE(YEAR(A1),MONTH(A1)+1,DAY(A1))-
IF(DAY(DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)))<DAY(A1),
DAY(DATE(YEAR(A1),MONTH(A1)+1,DAY(A1))))—ron
06-11-2005, 12:05 AM
#5
Re: A formula to show Next month
Try
=DATE(YEAR(A1),MONTH(A1)+1,1)
—
Regards,Peo Sjoblom
(No private emails please)
«AndreL» <AndreL@discussions.microsoft.com> wrote in message
news:1F3B15E3-E699-45A9-B3CC-5B872DA40831@microsoft.com…
> The first one shows «Jun-00» and it shows it that way cause I have the
> fomat
> of the cell setup for dates. And the date type as «Mar-01» And I look on
> the
> Internet to find a way to do the next month from the current formula. What
> I
> have is «Today () +31» and it show the next month form the current. Now
> will
> that in any way not work for months that have either 31 or 30 days.
> oh yea and … thank for you hel Stan The Man.
> «Stan Brown» wrote:
>
>> On Fri, 10 Jun 2005 17:51:03 -0700, AndreL
>> <AndreL@discussions.microsoft.com> wrote:
>>
>> >I looking for a fuction that show next month and not the current month.
>> >Cause
>> >the formula I have show the current month which is «=TODAY()». So your
>> >help
>> >will be appreciated.
>>
>> What do you mean by «next month»?
>>
>> The month number?
>>
>> =MOD(MONTH(TODAY()),12)+1
>>
>> The first day of the next month?
>>
>> =EOMONTH(TODAY(),0)+1
>>
>> The last day of the next month?
>>
>> =EOMONTH(TODAY(),1)
>>
>> or something else?
>>
>> —
>> Stan Brown, Oak Road Systems, Tompkins County, New York, USA
>> http://OakRoadSystems.com/
>> «I feel a wave of morning sickness coming on, and I want to
>> be standing on your mother’s grave when it hits.»
>>
In this post, we can learn how to easily create a monthly calendar in Excel 365 using some of the date functions and the Sequence.
It’s a dynamic monthly calendar that updates when you change month and year. In addition to that, there are rooms given for entering notes below dates. The formula won’t break.
Because of the dynamic array feature in Excel 365, some of the formulas SPILL their results. The Sequence is one such function.
Actually, a single piece of code (a formula in one cell) in Excel 365 can populate a whole month’s calendar. But the problem with such a formula is it would break when you hand enter any texts (notes) below the dates.
So I have broken the formula into six pieces and entered them in the very first cell of every alternate row. This way, I could give room for entering notes without breaking the formula.
Let’s see how to easily create a dynamic monthly calendar in Excel 365 using formulas.
To make the calendar dynamic (supports user interaction), we should provide two cells to input the month and year. So when changing those values, the calendar will update.
In the following example, cells G1 and H1 are those input cells.
Prerequisites
To avoid typos, you may create a drop-down in cell G1 with the month names to select.
To do that in Excel 365, you can follow the below few steps.
1. Make sure that the active cell is G1.
2. Under the “Data” menu, find the “Data Validation” under the “Data Tools.” Click it.
3. Select “List.”
4. Paste the text January, February, March, April, May, June, July, August, September, October, November, December within the “Source” field.
5. Click OK.
Now one more thing to do. In cell range B3:H3, enter the day names from Sunday to Monday.
Formula to Create a Dynamic Monthly Calendar in Excel 365
Insert the below formula in cell B5 (You won’t get the correct result. I’ll come to that.)
=SEQUENCE(1,7,DATE(H1,MONTH(G1&1),1)-WEEKDAY(DATE(H1,MONTH(G1&1),1))+1)
Before moving to the next step, let’s learn this Excel 365 formula.
How Does this Formula Spill Dates?
The above Excel formula returns dates or date values in one row and seven columns as per the syntax SEQUENCE(ROWS, COLUMNS, START)
The start value within the Sequence determines the date to start. Here is that formula.
=DATE(H1,MONTH(G1&1),1)-WEEKDAY(DATE(H1,MONTH(G1&1),1))+1
Let’s split this Excel 365 formula into two parts.
Part_1
=DATE(H1,MONTH(G1&1),1)
It returns the first day of the month of the selected month in cell G1.
Part_2
=WEEKDAY(DATE(H1,MONTH(G1&1),1))
It returns the weekday number of the above part_1 date. So part_1 - part_2+1
will be the week start date (Sunday).
Supporting Formulas
Insert the following formulas in cells B7, B9, B11, B13, and B15.
B7
=SEQUENCE(1,7,H5+1)
B9
=SEQUENCE(1,7,H7+1)
B11
=SEQUENCE(1,7,H9+1)
B13
=SEQUENCE(1,7,H11+1)
B15
=SEQUENCE(1,7,H13+1)
The result of the above Excel 365 formulas may be date values. So select those dates (rows 5, 7, 9, 11, 13, and 15) and format them to date.
To do that, under the “Format” menu, find the “Cells” group. Within that group, click Format -> Format Cells. Alternatively, you can use the shortcut Ctrl+1.
Under the “Number” tab, select “Date” and choose the format that you wish to apply.
We require to follow one more step to finishing our custom Monthly Calendar Using Formulas in Excel 365. That’s conditional formatting.
Hide Certain Dates By Changing Font Color
We have created a monthly calendar in Excel 365 using a limited number of formulas. But there is one unaddressed issue.
You can see some of the dates that fall in the previous/next months of the selected month in cell G1.
Follow the below steps to hide those dates. That’s the final step to create a dynamic calendar in Excel 365.
Steps
1. Select B5:H15.
2. Click “Conditional Formatting” under the “Home” tab “Styles” group.
3. Click “New Rule”.
4. Under “Select a Rule Type,” choose “Use a formula to determine which cells to format.”
5. Insert the below formula in the field provided.
=MONTH(B5)<>MONTH($G$1&1)
6. Click “Format” and choose “Font” color to White.
7. Click OK -> OK and voila!
This way, we can create a dynamic monthly calendar in Excel 365.