Forum Discussion
Pistachio1027
Mar 04, 2025Copper Contributor
Conditional formatting - new rule based on two related column headings
Need to create a new rule that changes cell colors (column H) based on more than 2 falls (column C) in 30 days for the same person (column A). I've found the formula for just the date - but not for a...
Pistachio1027
Mar 10, 2025Copper Contributor
Thank you for this! It's been very helpful for the green fill.
I am trying to apply the formula and substituting the applicable cells - but it does not seem to work.
=AND(XLOOKUP(B1,B:B,G:G,,0,-1)-XLOOKUP(B1,B:B,G:G,,0,1)>0,XLOOKUP(B1,B:B,G:G,,0,-1)-XLOOKUP(B1,B:B,G:G,,0,1)<=30)
I cannot get it to work.
ScottAng
Mar 11, 2025Brass Contributor
The formula for yellow expects the dates to be in ascending order, as that is how the dates are in your previous file. In your latest file, the dates are in descending order. I have modified the formula accordingly. Also, I have moved the CF for green to the top, assuming green should supersede yellow when conditions for both colors are met for the same row.