Reputation: 147
I have been struggling with this now for 2 days. I am very hopeful that you will be able to help.
I have a spreadsheet (example provided below) where I need to highlight an entire row using conditional formatting if any of the cells in that row have a date within the specified range.
A B C D E
Place 1 Place 2 Place 3 Place 4
3 Item A 26.10.2021 10.8.2021
4 Item B 15.10.2021
5 Item C 20.9.2021
6 Item D
7 Item E 1.10.2021
So, for example, I would need to highlight the entirety of row 3 when I am looking for a date within the last week. Or the entirety of row 5 if I was looking for something with a date last month.
So far I have tried using the Today() function to specify my ranges, such as today()-1 for the last 24 hours, today()-7 for the last week etc. I have looked at videos from Prolific Oaktree trying to understand CF better, I have tried every combination I can think of with things like ISBETWEEN.
The spreadsheet I am working with has several hundred columns and thousands of lines, so this isnt something where I can go through and write a formula for each individual row.
Please let me know if I can clarify anything.
Upvotes: 1
Views: 235
Reputation: 11978
Use a CF rule based on a formula:
It highliths all rows if any date in the row's cells contains a date between start and end dates (at right side)
My formula is:
=COUNTIFS($B2:$E2;">="&$H$2;$B2:$E2;"<="&$H$3)>0
If I change start and end date, CF rule will update instantly:
Upvotes: 1