How to Highlight Current Month and Year in Excel Using Conditional Formatting
Question details
The user needs a conditional formatting rule to highlight cells in a specific column when the date matches the current month and year.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking and highlighting current data based on dates falling within the present month and year.
- Observed behavior
- An earlier formula failed to work correctly, highlighting random and unrelated months (such as November and August) instead of the current month.
Ensure that the cells in your target column contain valid Excel dates, rather than text strings, so the formula can accurately evaluate the month and year.
Use the EOMONTH Formula in Conditional Formatting
Applying the EOMONTH function guarantees an accurate comparison of the month and year against today's date, ignoring the specific day value.
The EOMONTH (End of Month) function returns the last day of the month for a specified date. By comparing the end of the month of the current date (TODAY) to the end of the month of your target cell, Excel perfectly aligns the dates to check if they share the same month and year.
Highlight the cells in your date column (e.g., Column E, starting from E2) where you want the conditional formatting to apply.
Navigate to the 'Home' tab on the Excel ribbon, click on 'Conditional Formatting', and select 'New Rule' from the drop-down menu.
Choose 'Use a formula to determine which cells to format'. In the formula box, enter exactly: =EOMONTH(TODAY(),0)=EOMONTH($E2,0)
Click the 'Format' button, go to the 'Fill' tab, select your preferred highlight color, and click 'OK' twice to apply the rule.

Highlight Dates Easily in WPS Spreadsheet
WPS Spreadsheet supports advanced conditional formatting and all standard Excel formulas, including EOMONTH, allowing you to highlight current months seamlessly.
- 1. Select your dates: Open your document in WPS Spreadsheet and select the column containing your date values.
- 2. Access Conditional Formatting: Go to the 'Home' tab, click 'Conditional Formatting', and choose 'New Rule'.
- 3. Input the formula: Select the option to use a formula and input =EOMONTH(TODAY(),0)=EOMONTH($E2,0) into the field.
- 4. Set color and apply: Click 'Format' to choose your highlight color, then click 'OK' to instantly format the current month's dates.

Frequently Asked Questions
Why is my conditional formatting highlighting the wrong months?
This usually happens if the formula references the wrong starting cell, uses an absolute reference (like $E$2 instead of $E2) when applied to a range, or if the cells contain plain text instead of valid date formats.
Can I highlight dates for the current year only, regardless of the month?
Yes, you can use a simpler formula in your conditional formatting rule to match only the year. Use =YEAR(TODAY())=YEAR($E2) to highlight any date falling in the current year.
How do I highlight the previous month using conditional formatting?
You can modify the EOMONTH formula to look back exactly one month by changing the zero in the TODAY function to -1. The formula would be: =EOMONTH(TODAY(),-1)=EOMONTH($E2,0).




