# How to check if a date is in the current month in Excel

Compare month ends: `=IF(EOMONTH(B2,0)=EOMONTH($F$1,0),"Yes","No")` checks the month and the year at once, with today in F1.

**Excel:** `=IF(EOMONTH(B2,0)=EOMONTH($F$1,0),"Yes","No")` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- |
| Invoice | Date | This month? |  | Today | 2026-10-29 |
| INV-881 | 2026-10-01 |  |  |  |  |
| INV-882 | 2026-09-30 |  |  |  |  |
| INV-883 | 2026-10-29 |  |  |  |  |
| INV-884 | 2025-10-15 |  |  |  |  |
| INV-885 | 2026-10-31 |  |  |  |  |
| INV-886 | 2026-11-02 |  |  |  |  |

Formula in C2, filled to C7: `=IF(EOMONTH(B2,0)=EOMONTH($F$1,0),"Yes","No")`

Result: Yes; No; Yes; No; Yes; No

## How it works

Every date in a month shares the same month end, so comparing EOMONTH of the date with EOMONTH of today checks the month and the year in one test. October 15, 2025 has a different month end, so it doesn't count. Put `=TODAY()` in F1 for a live report.

## Other ways

- `=IF(AND(MONTH(B2)=MONTH($F$1),YEAR(B2)=YEAR($F$1)),"Yes","No")`: Compares the month and the year separately.
- `=IF(TEXT(B2,"yyyymm")=TEXT($F$1,"yyyymm"),"Yes","No")`: Compares a year-month code like 202610.
- `=IF(MONTH(B2)=MONTH($F$1),"Yes","No")`: A common mistake: it ignores the year. (October 2025 counts too.)

## Common mistakes

- Comparing MONTH alone matches the same month in every year.
- For "this month so far", also require `B2<=$F$1`, which drops future-dated rows.

## Questions

**How do I check if a date is in last month?**

`=EOMONTH(B2,0)=EOMONTH($F$1,-1)`.

**How do I check if a date is in the current week?**

Compare the week starts: `=B2-WEEKDAY(B2,3)=$F$1-WEEKDAY($F$1,3)`.

**How do I count this month's invoices?**

Count dates after last month's end and up to this month's: `=COUNTIFS(B2:B7,">"&EOMONTH(F1,-1),B2:B7,"<="&EOMONTH(F1,0))`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/check-if-a-date-is-in-the-current-month
