Condition format days within month

EMcK01

Board Regular
Joined
Jun 14, 2015
Messages
125
Hi, this seems like it should be straightforward but I can't work it out.

I have a list 1st of the month for each month of the year in column A. I then have a list of 42 days in the rows (ie, 01, 02, 03) that ties up with the appropriate day in the month. Is there is simple way to highlight those dates that are outwith the month or highlight the dates that are only within the month?

I tried =MONTH(D2)<>MONTH(A2) where D2 is the start of the range of dates for the month and A2 is where the first of the month is listed. I thought this would highlight the days outwith the month but its returning a random highlight.

Any thoughts on this?

Thanks
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,215,018
Messages
6,122,703
Members
449,093
Latest member
Mnur

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