Conditional Format

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
582
Office Version
  1. 365
I know this should be simple, but my head won't work this out!
In Row 1 I have months
In Column A I have dates of work started
What I need is conditional format to "grey out" the cell if the date in column A is before the start date of the month

So if the date was 02/04/19 it will leave the April column blank,
if it was 2 May 2019, it would grey out April, but leave May 2019 blank,
if it was June, then both April and May would be greyed out etc.

abcde
1APRIL 2019MAY 2019JUNE 2019JULY 2019
203/04/19
307/05/19(GREYED OUT)
406/06/19(GREYED OUT)(GREYED OUT)
501/08/19(GREYED OUT)(GREYED OUT)(GREYED OUT)(GREYED OUT)
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
What are the actual values in B1,C1 etc?
 
Upvote 0
A custom rule would work, highlight the region you want to apply to then open a new CF rule and put:

=AND(MONTH($A2)>MONTH(B$1),YEAR($A2)>=YEAR(B$1)) --> Format with however you choose (greyed pattern style would be ideal under fill tab on format cells)

EDIT: Taken into account of the year too incase month piles over to following year.
 
Last edited:
Upvote 0
Apologies, that doesn't quite work as intended after some further testing...

Try:
=AND($A2>B$1,OR(MONTH($A2)>MONTH(B$1),YEAR($A2)>YEAR(B$1)))
 
Upvote 0
Select B2 to the end of data & use
=$A2>EOMONTH(B$1,0)
 
Upvote 0

Forum statistics

Threads
1,214,806
Messages
6,121,672
Members
449,045
Latest member
Marcus05

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