Excel Formulas to Check Dates are Same Month and Year {Easy Tricks}
Tags: excelformula, excelformulas
Published: 2021-05-12 05:02:39

---
title: Excel Formulas to Check Dates are Same Month and Year {Easy Tricks}
published: true
date: 2021-05-11 07:03:12 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-check-dates-are-same-month-and-year-easy-tricks/
---

In the previous post, we have learned the simple formula to**[check the date is the same month in Excel](https://geekexcel.com/excel-formulas-to-check-date-is-same-month/)**. Likewise, here we are going to compare two dates and **check the dates belong to the same month and year**. Let’s get into this article!! Get an official version of ** MS Excel**  from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)

[![Check date is same month and year](https://geekexcel.com/wp-content/uploads/2021/05/Check-date-is-same-month-and-year.png)](https://geekexcel.com/excel-formulas-to-check-dates-are-same-month-and-year-easy-tricks/check-date-is-same-month-and-year/#main)<figcaption id="caption-attachment-39707">Check date is same month and year</figcaption>

## Generic Formula:

- You can use the below formula to est two dates and see they both have the same month and year.

**=[MONTH](https://geekexcel.com/how-to-use-month-function-in-microsoft-excel-365/)(date1)&[YEAR](https://geekexcel.com/how-to-use-year-function-in-excel-365/)(date1)=MONTH(date2)&YEAR(date2)**

## Syntax Explanations:

- **MONTH**  – This function helps to extract the month number ranging from 1 (JAN) to 12 (DEC) from the given date and displays the output. Read more on the [**MONTH function**](https://geekexcel.com/how-to-use-month-function-in-microsoft-excel-365/).
- **YEAR** – In Excel, the **[YEAR function](https://geekexcel.com/how-to-use-year-function-in-excel-365/)** will extract the year from the given date and return the year as a 4-digit number.
- **Date**  – It represents the input range from your worksheet.
- **Comma symbol (,)** – It is a separator that helps to separate a list of values.
- **Parenthesis ()** – The main purpose of this symbol is to group the elements.

## Example:

Let’s consider the below example image.

- First, we will enter the input values in **Column B** and **Column C**.
- Here we are going to compare these two dates and check the dates are the same month and year.

![Input Ranges](https://geekexcel.com/wp-content/uploads/2021/05/Input-Ranges-17.png)<figcaption id="caption-attachment-39709">Input Ranges</figcaption>

- Select any cell and type the above-given formula.

![Enter the formula](https://geekexcel.com/wp-content/uploads/2021/05/Enter-the-formula-31.png)<figcaption id="caption-attachment-39708">Enter the formula</figcaption>

- Finally, press  **ENTER**  to get the result out, if you need, drag the fill handle over range to apply the formula.

![Result](https://geekexcel.com/wp-content/uploads/2021/05/Result-29.png)<figcaption id="caption-attachment-39710">Result</figcaption>

## Conclusion:

Hope you like this article on how to check whether the **dates belong to the same month and year or not in Excel**. Let me know if you have any **doubts** regarding this article or any other Excel/VBA topic.

Thank you so much for visiting  **[Geek Excel](https://geekexcel.com/)!! **If you want to learn more helpful formulas, check out [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!! **

### Related Articles:

- **[Excel Formulas to Create Date Range From Two Dates ~ Quick Tricks!!](https://geekexcel.com/excel-formulas-to-create-date-range-from-two-dates-quick-tricks/)**
- **[How to Compare Two Ranges using Macros (VBA) in Excel 365?](https://geekexcel.com/how-to-compare-two-ranges-using-macros-vba-in-excel-365/)**
- **[Excel Formulas to Convert Unix Time Stamp into Excel Date!!](https://geekexcel.com/excel-formulas-to-convert-unix-time-stamp-to-excel-date/)**