Forum Discussion
eatonad
Feb 13, 2022Copper Contributor
Excel conditional formatting
I have a column that is time and a column with item x I cannot have two of the same item in a two hour period. I have used conditional formatting to highlight for a two hour block from 1-3,4-6,etc....
eatonad
Feb 14, 2022Copper Contributor
=COUNTIFS($L$2:$L$49,$L2,$B$2:B$49,"<="&($B2+1),$B$2:$B$49,">="&($B2-1))>1
This is the formula in case you cannot read it
This is the formula in case you cannot read it
SergeiBaklan
Feb 14, 2022Diamond Contributor
As a minimum you shall use $B2+1/24 and $B2-1/24
since in column B you use time as the time (1:00 = 1/24 of the day), not as general numbers as in the post (1 hour, 2 hours, etc)
- eatonadFeb 15, 2022Copper ContributorWorks perfectly thank you people so much and not just solving it explaining it so I can understand why.