Forum Discussion
riffraff55
Sep 18, 2023Copper Contributor
Highlight rows in excel based on Month and Year values
HI there, I Have 3 columns in my spreadsheet. Registered date Refresh Date Age Sep-19 01/09/2024 4y 0m Sep-19 01/09/2024 4y 0m Sep-19 01/09/2024 4y 0m Sep-19 01/09/2024...
HansVogelaar
Sep 18, 2023MVP
Select the rows that you want to format.
I'll assume that row 6 is the top row of the selection, based on your example formula.
The active cell in that selection should be in the top row, i.e. in row 6.
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
=DATEDIF($H6,$O$3,"y")<3
Click Format...
Activate the Fill tab.
Select green as highlight color.
Click OK, then click OK again.
Repeat these steps, but with
=DATEDIF($H6,$O$3,"y")=3
as formula and yellow as color.
Finally, repeat them again with the formula
=DATEDIF($H6,$O$3,"y")>3
and red as color.