In an excel file, I want to highlight a row conditionally. My columns are as follows:
Column A: Serial Number
Column B: Productivity Pages
Column C: Cancellation Percentage
Column D: Minimum Cancellation Percentage
Column E: Maximum Productivity Pages
My goal is to yellow-highlight that row that meets the following criteria:
First check for those rows that have minimum cancellation percentage (Column C).
Within the rows with minimum cancellation percentage, find that row that has maximum productivity pages (Column B).
The sample values are as follows:
In this sample, the formula needs to first select serial number 4 and 5, because they have minimum cancellation percentages. Then within 4 and 5, the formula needs to select serial number 4, because it has maximum productivity pages.
To build the formula for applying in conditional formatting, I entered the following formula in Column D cell D2:
and copied the formula up to C6. This showed 1 for serial number 4 and 5.
Now the harder part is to extract maximum from serial number 4 and 5. In column E, I entered the following formula:
and pressed ctrl+shift+enter to make it an array formula. The result showed 1400, which is correct. However, when I copy the array formula up to E6, due to the range D26 and B2:B6 being flexible, the formula does not work correctly. If I lock the range using $ sign, the formula does not work in that case too.
Column A: Serial Number
Column B: Productivity Pages
Column C: Cancellation Percentage
Column D: Minimum Cancellation Percentage
Column E: Maximum Productivity Pages
My goal is to yellow-highlight that row that meets the following criteria:
First check for those rows that have minimum cancellation percentage (Column C).
Within the rows with minimum cancellation percentage, find that row that has maximum productivity pages (Column B).
The sample values are as follows:
Code:
Serial_Number Productivity_Pages Cancellation Percentage
1 900 3.00
2 1500 1.00
3 200 9.00
4 1400 0.00
5 1300 0.00
In this sample, the formula needs to first select serial number 4 and 5, because they have minimum cancellation percentages. Then within 4 and 5, the formula needs to select serial number 4, because it has maximum productivity pages.
To build the formula for applying in conditional formatting, I entered the following formula in Column D cell D2:
Code:
=IF(C2=MIN($C$2:$C$6),1,0)
Now the harder part is to extract maximum from serial number 4 and 5. In column E, I entered the following formula:
Code:
=MAX((D2:D6=1)*B2:B6)