Excel Formula for Current Month and Year (3 Examples)

Let’s use the following dataset that represents some gadgets’ order date at a store. Here the order dates are the current date and the dates are in full form, and we’ll extract the month and year.


Method 1 – Use the MONTH and YEAR Functions in a Formula for Current Month and Year in Excel

Steps:

  • Select cell C5.
  • Type the following formula in it:
=MONTH(TODAY()) & "-" & YEAR(TODAY())
  • Press Enter to get the current month and year.

Use the MONTH and YEAR Functions for Current Month and Year in Excel

  • Drag down the Fill Handle icon to copy the formula for the other cells.

Use the MONTH and YEAR Functions for Current Month and Year in Excel

  • This fills the table.


Method 2 – Use the TEXT Function Formula in Excel for Current Month and Year in Excel

Steps:

  • Write the following formula in cell C5:
=TEXT(TODAY(),"mmm/yyy")
  • Press the Enter button to get the output.

Use the TEXT Function in Excel for Current Month and Year

  • To get the other outputs, drag down the Fill Handle icon over the cells C6:C8.

Use the TEXT Function in Excel for Current Month and Year

Here are all the outputs:

Note:

  • =TEXT(TODAY(), “mm/yy”) will return 03/22.
  • =TEXT(TODAY(), “mm-yy”) will return 03-22.
  • =TEXT(TODAY(), “mm-yyyy”) will return 03-2022.
  • =TEXT(TODAY(), “mmm, yyyy”) will return Mar, 2022.
  • =TEXT(TODAY(), “mmmm, yyyy”) will return March, 2022.

Read More: How to Get First Day of Month from Month Name in Excel


Method 3 – Use the DATE, MONTH, and YEAR Functions for Current Month and Year in Excel

Steps:

  • In cell C5, type the following formula:
=DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))
  • Press Enter to get the full current date.

Use the DATE, MONTH, and YEAR Functions for Current Month and Year in Excel

  • Use the Fill Handle tool to get the other outputs.

Use the DATE, MONTH, and YEAR Functions for Current Month and Year in Excel

Now we’ll have to change the format to get only the month and year from the dates.

  • Click the shortcut icon from the Number section of the Home tab as shown in the image below.

Use the DATE, MONTH, and YEAR Functions for Current Month and Year in Excel

  • Select an option that shows only the month and year.
  • Press OK.

All the dates are converted to month and year only.

Formula Breakdown:

➤ DAY(TODAY())
The DAY function will return the day number from the current date extracted by the TODAY function. So it will return as-
23

➤ MONTH(TODAY())
The MONTH function will return the month number from the current date extracted by the TODAY function and will return as-
3

➤ YEAR(TODAY())
The YEAR function will return the year number from the current date extracted by the TODAY function and then will return as-
2022

➤ DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))
Finally, the DATE function will return the full date combining the outputs of the DAY, MONTH, and YEAR functions. So the final output will return as-
3/23/2022

Read More: How to Calculate First Day of Previous Month in Excel


Convert Date to Month and Year Using Excel Number Formatting

In this section, we’ll learn an alternative way to return the current month and year by changing the format setting. We have extracted the order dates using the TODAY function.

Convert Date to Month and Year Using Number Formatting

Steps:

  • Select the dates.
  • Click the shortcut icon from the Number section of the Home tab to open the Format Cells dialog box.

Convert Date to Month and Year Using Number Formatting

  • Select one of the options that shows just the month and year.
  • Press OK.

You will get the month and year only from the current date.


Check If Current Date Has Same Month and Year as Any Other Date

For this, we have placed some random dates in column C and added a new checker column D to check the current date.

Steps:

  • Type the following formula in cell D5:
=MONTH(C5)&YEAR(C5)=MONTH(TODAY())&YEAR(TODAY())
  • Press the Enter button to show the result.

Check If Current Date Is Same Month and Year with Any Other Date

  • To check the other dates, drag down the Fill Handle icon.

  • Two dates matched and two dates didn’t match.


Download Practice Workbook

You can download the free Excel template from here and practice on your own.


Related Articles


<< Go Back to Excel MONTH Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Sourov Hossain Mithun
Md. Sourov Hossain Mithun

Md. Sourov Hossain Mithun, an Excel and VBA Content Developer at Softeko's ExcelDemy project, joined in October 2021. Holding a Naval Architecture & Marine Engineering degree from BUET, Mithun showcases expertise during his two-year tenure. With over 200 published articles on Excel topics, he earned a promotion to Team Leader, excelling in leading diverse teams. Mithun's passion extends to Advanced Excel, Excel VBA, Data Analysis, and Python programming, contributing significantly to the innovative and dynamic environment of ExcelDemy... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo