JonXL
Well-known Member
- Joined
- Feb 5, 2018
- Messages
- 513
- Office Version
- 365
- 2016
- Platform
- Windows
Hello,
I'm trying to apply conditional formatting to a worksheet to highlight a cell in column E each time the value changes and have this work with filters on only the visible cells.
If I don't pay the visible cell issue any attention, I can make this work by applying this conditional format to all of
So if I have the following:
It might look like this:
However, when I filter the column, if the filter removes, say, the first value 4, then the visible one remaining won't have the right formatting.
What I need is for the 4 to be highlihghted because it's different from the visible cell above it, not the actual cell (the actual cell is 4, the visible cell is 2).
I was looking at this as a possible formula, but I can't figure out how to convert it to my case - though I am thinking it might apply(?)...
But I think I'd need an offset inside an offset... I honestly have no idea and maybe this is down the wrong path.
Is anyone aware of a way to make this work?
I can't use VBA code in this approach because it needs to be something that can be applied quickly to any workbook and my users will not be able to do that with code.
If I need to provide any additional details or anything, let me know. I appreciate anyone taking the time to look at this.
Thank you!
Jon
I'm trying to apply conditional formatting to a worksheet to highlight a cell in column E each time the value changes and have this work with filters on only the visible cells.
If I don't pay the visible cell issue any attention, I can make this work by applying this conditional format to all of
E:E
:
Excel Formula:
=E1<>OFFSET(E1,-1,0)
So if I have the following:
Book1 | |||
---|---|---|---|
E | |||
1 | 1 | ||
2 | 1 | ||
3 | 2 | ||
4 | 3 | ||
5 | 4 | ||
6 | 4 | ||
Sheet1 |
It might look like this:
Book1 | |||
---|---|---|---|
E | |||
1 | 1 | ||
2 | 1 | ||
3 | 2 | ||
4 | 3 | ||
5 | 4 | ||
6 | 4 | ||
Sheet1 |
However, when I filter the column, if the filter removes, say, the first value 4, then the visible one remaining won't have the right formatting.
Book1 | |||
---|---|---|---|
E | |||
1 | 1 | ||
2 | 1 | ||
3 | 2 | ||
6 | 4 | ||
Sheet1 |
What I need is for the 4 to be highlihghted because it's different from the visible cell above it, not the actual cell (the actual cell is 4, the visible cell is 2).
I was looking at this as a possible formula, but I can't figure out how to convert it to my case - though I am thinking it might apply(?)...
Count visible rows with criteria
To count visible rows with criteria, you can use a rather complex formula based on three main functions: SUMPRODUCT, SUBTOTAL, and OFFSET. In the example shown, the formula in H7 is: =SUMPRODUCT((data=H4)*(SUBTOTAL(103,OFFSET(INDEX(data,1),ROW(data)-MIN(ROW(data)),0)))) Where data is the named...
exceljet.net
But I think I'd need an offset inside an offset... I honestly have no idea and maybe this is down the wrong path.
Is anyone aware of a way to make this work?
I can't use VBA code in this approach because it needs to be something that can be applied quickly to any workbook and my users will not be able to do that with code.
If I need to provide any additional details or anything, let me know. I appreciate anyone taking the time to look at this.
Thank you!
Jon