Conditional format using AND to highlight today's date

test_man2

New Member
Joined
Aug 28, 2007
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Greetings!,
I'm trying to highlight today's date using AND because just using =DAY(TODAY()) as the formula is highlighting the same number in every row.
I have a perpetual calendar spreadsheet that is set up like this:
Column A has a 3-letter month abbreviation,
Row 7, starting at column B, has 3-letter abbreviations of the days of the week that goes out to column AL.
Here's a little snippet just to give you an idea of what it looks like.
1663012879223.png


What I'd like to do is highlight today's date in this month's row (whatever month that may be). Right now, using =DAY(TODAY()) as the Conditional Formatting formula, it highlights every number on each month. When I tried to use =AND(a25="Sep",DAY(TODAY())), it doesn't work. Here's what the formula looks like currently:
1663013388447.png

and, today (9/12) the 12 cell is highlighted. But when I add A25="Sep", the cell does not highlight.
What am I missing?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Remove what you have now.
Then, select range B25:AL25, go to Conditional Formatting and select the "Use a Formula to Determine Which Cells to Format" option, and enter this formula:
Excel Formula:
=AND($A25="Sep",B25=DAY(TODAY()))
and choose your desired color.
 
Upvote 0
That works! Thank you!
I see the difference between what you posted and what I was using, but what makes yours work and mine not?
 
Upvote 0
I see the difference between what you posted and what I was using, but what makes yours work and mine not?
The "Cell Value=" option will ONLY look at the value of the cell that it is being applied to.
So you cannot apply it to cell B25 while also considering the value in cell A25.
You need something more robust, which is why you want the formula option, where you basically just create a boolean formula that returns TRUE or FALSE.

Note that reagrding my original formula, if you wanted to make it dynamic, to always use the current month (so you do not need to hard-code it), you could use:
Excel Formula:
=AND($A25=TEXT(TODAY(),"mmm"),B25=DAY(TODAY()))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top