Jun 22 2023 08:50 AM
I regularly create price matrices where the prices in each column should reduce row by row (Top down) and likewise each row should also reduce in price column by column (L to R).
i.e. Highest price is always top left cell and lowest is bottom right cell.
Basically every cell should be a lower value than the cells immediately left and above itself
Is there away to highlight a cell that falls outside the expected behaviour without creating rules for individual cells?
Thanks
Jun 23 2023 02:23 AM
You can use conditional formatting in Excel 365 to highlight cells that fall outside the expected behavior without creating rules for individual cells. You can achieve this by using a custom formula that compares the values of the current cell with the values of the cell above and the cell to the left.
Here is how you can set up the conditional formatting rule:
=AND(A1<>""; A1<>"<"; A1>INDEX($A$1:A1, ROW()-1); A1>INDEX($A1:A$1, , COLUMN()-1))
Note: Replace A1 with the top-left cell of the selected range.
The above formula checks if the current cell is not empty (A1<>""), not equal to the text "<" (A1<>"<"), and greater than the value in the cell above it (A1>INDEX($A$1:A1, ROW()-1)) and the value in the cell to the left (A1>INDEX($A1:A$1, , COLUMN()-1)). If any of these conditions are not met, the cell will be highlighted according to the specified formatting.
The conditional formatting rule will be applied to the selected range, and any cell that falls outside the expected behavior will be highlighted.
Text, steps and formula were created with the help of AI for time reasons and convenience :).
Hope it helps you!
Jun 23 2023 04:52 AM
As variant that could be two rules applied to the range but first row, and to the range but first column