Forum Discussion
Date Checking custom rules
Select A3:G100 or however far down you want.
The active cell in the selection should be in row 3, for example A3.
On the Home tab of the ribbon, click Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula
=$C3<>""
Click Format...
Activate the Fill tab.
Select red as highlight color.
Click OK, then click OK again.
Repeat these steps, but with
=$C3>=TODAY()+4
and orange (amber) as color.
Repeat them again, but with
=$C3>=TODAY()+10
and yellow as color.
Finally, repeat them with
=$H3<>""
and green.
Next, select C3:C100 or as far down as you want. C3 should be the active cell in the selection.
On the Home tab of the ribbon, click Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula
=AND($C3="",$H4<>"")
Click Format...
Select pink as highlight color.
Click OK, then click OK again.
- PaskylouMar 11, 2024Copper Contributor
Can I apply this kind of formatting to rows as opposed to columns?
Basically I'd like Row 18 cells to turn red should rows 9, 10 or 13 have data in them (columns B-AF) is that something I can do?
- HansVogelaarMar 11, 2024MVP
Select B18:AF18.
B18 should be the active cell in the selection.
On the Home tab of the ribbon, click Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula=COUNTA(B$9, B$10, B$13)
Click Format...
Activate the Fill tab.
Select red as fill color.
Click OK, then click OK again.
- PaskylouSep 15, 2023Copper Contributor
HansVogelaar sorry another question for you!
This worked perfectly, you're a star!
I would like to create a 'key' so people know what the colours mean. Is it possible to do, or do i do it manually? Also, is it possible to have it so it's visable wherever you scroll? I did put it in column A so i could freeze top row and first column, but column A is only visable if i scroll A-Z, but i'd like it visable as i scroll further down the worksheet (row 100+)
any ideas?
- HansVogelaarSep 15, 2023MVP
You'll have to create the legend (or key) manually.
You might insert a few empty rows at the top, and create the legend in A1:A5 (fill color as in the conditional formatting rules, description as cell text).
Then freeze the top 5 rows and left column:
- PaskylouSep 15, 2023Copper ContributorSuper, thank you so much.