Note: The other languages of the website are Google-translated. Back to English

Excel Formula: Check IF Two Dates Are In Same Month And Year

doc convert date to julia 1

There are two lists of dates, now to check if the two dates in the same row are in the same month and year in Excel, which formula can you use? Here in this tutorial, a formula can help you.

If you want to follow along with this tutorial, please download the example spreadsheet.
doc convert date to julia 1

Generic formula:

MONTH(date1)&YEAR(date1)=MONTH(date2)&YEAR(date2)

Syntaxt and Arguments

Date1, date2:the two dates you want to check if are in the same year and month.

Return Value

The formula returns to a logical value “TRUE” or “FALSE”. “TURE” indicates the two dates are in the same month and year, otherwise, it returns “FALSE”.

How this formula works

To compare two lists in the range B3:B5 and C3:C5 and check if the dates in the same row are in the same year and month, using below formula:

=MONTH(B3)&YEAR(B3)=MONTH(C3)&YEAR(C3)

Press Enter key and drag auto fill handle down to cell D5.
doc convert date to julia 1
doc convert date to julia 1

Explanation

MONTH function: returns month as integer number by the given date.

YEAR function: returns year as integer number by the given date.

=MONTH(B3)&YEAR(B3)=MONTH(C3)&YEAR(C3)
=4&2020=5&2020
=42020=52020
=FALSE

Note

If you just want to check if the dates are in same month or same year, use the formula like:

MONTH(date1)=MONTH(date2)

or

YEAR(date1)=YEAR(date2)

Relative Formulas

Relative Functions


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (1)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This is a shorter formula to check if two dates fall in the same month:=EOMONTH(B3,0)=EOMONTH(C3,0)
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations