Conditional Formatting- MIN value in 2 diff columns

gtd526

Active Member
Joined
Jul 30, 2013
Messages
468
Office Version
  1. 2019
Platform
  1. Windows
Hello,
Using conditional formatting, how can I Highlight MIN value of 2 different cells in 2 different columns?
Thank you.

Data:
$H3 vs $P3, moving down

Grocery List.xlsm
ABCDEFGHIJKLMNOP
2PRODUCTBRANDTypePRICESizeWeightGrocerCost/PiecePRODUCTBRANDTypePRICESizeWeightGrocerCost/Piece
3CoffeeFolgersInstant$8.9912ozPublix$0.75CoffeeFolgersInstant$6.9916ozBJs$0.44
4Chicken StripsTysonBuffalo$9.4925ozPublix$0.38Chicken StripsTysonBuffalo$15.7956ozBJs$0.28
5MilkPublixMilk$3.951galPublix$3.95MilkWesley FarmsMilk$3.091galBJs$3.09
Publix vs BJ's
Cell Formulas
RangeFormula
D3:D5D3=INDEX(GroceryMaster!$F$3:$F$1048576, MATCH(1, ('Publix vs BJ''s'!$A3=GroceryMaster!$A$3:$A$1048576)*('Publix vs BJ''s'!$B3=GroceryMaster!$B$3:$B$1048576) * ('Publix vs BJ''s'!$C3=GroceryMaster!$C$3:$C$1048576)*('Publix vs BJ''s'!$G3=GroceryMaster!$G$3:$G$1048576), 0))
E3:E5E3=INDEX(GroceryMaster!$D$3:$D$104500, MATCH(1, ('Publix vs BJ''s'!$A3=GroceryMaster!$A$3:$A$1048576)*('Publix vs BJ''s'!$B3=GroceryMaster!$B$3:$B$1048576) * ('Publix vs BJ''s'!$C3=GroceryMaster!$C$3:$C$1048576)*('Publix vs BJ''s'!$G3=GroceryMaster!$G$3:$G$1048576), 0))
F3:F5F3=INDEX(GroceryMaster!$E$3:$E$104500, MATCH(1, ('Publix vs BJ''s'!$A3=GroceryMaster!$A$3:$A$1048576)*('Publix vs BJ''s'!$B3=GroceryMaster!$B$3:$B$1048576) * ('Publix vs BJ''s'!$C3=GroceryMaster!$C$3:$C$1048576)*('Publix vs BJ''s'!$G3=GroceryMaster!$G$3:$G$1048576), 0))
I3:K4I3=A3
L3:L5L3=INDEX(GroceryMaster!$F$3:$F$1048576, MATCH(1, ('Publix vs BJ''s'!$I3=GroceryMaster!$A$3:$A$1048576)*('Publix vs BJ''s'!$J3=GroceryMaster!$B$3:$B$1048576) * ('Publix vs BJ''s'!$K3=GroceryMaster!$C$3:$C$1048576)*('Publix vs BJ''s'!$O3=GroceryMaster!$G$3:$G$1048576), 0))
M3:M5M3=INDEX(GroceryMaster!$D$3:$D$104500, MATCH(1, ('Publix vs BJ''s'!$I3=GroceryMaster!$A$3:$A$1048576)*('Publix vs BJ''s'!$J3=GroceryMaster!$B$3:$B$1048576) * ('Publix vs BJ''s'!$K3=GroceryMaster!$C$3:$C$1048576)*('Publix vs BJ''s'!$O3=GroceryMaster!$G$3:$G$1048576), 0))
N3:N5N3=INDEX(GroceryMaster!$E$3:$E$104500, MATCH(1, ('Publix vs BJ''s'!$I3=GroceryMaster!$A$3:$A$1048576)*('Publix vs BJ''s'!$J3=GroceryMaster!$B$3:$B$1048576) * ('Publix vs BJ''s'!$K3=GroceryMaster!$C$3:$C$1048576)*('Publix vs BJ''s'!$O3=GroceryMaster!$G$3:$G$1048576), 0))
P3:P5,H3:H5H3=D3/E3
Press CTRL+SHIFT+ENTER to enter array formulas.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,751
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
1. Select all the cells in column H you want to conditionally format.
2. Home>Conditional Formatting>New Rule>Use a formula.
3. Formula is: =AND($H3<=$P3,$H3<>"",$P3<>"")
4. Choose format and click OK
5. Select all the cells in column P you want to conditionally format.
6. Home>Conditional Formatting>New Rule>Use a formula.
7. Formula is: =AND($P3<=$H3,$H3<>"",$P3<>"")
8. Choose format and click OK
 
Solution

gtd526

Active Member
Joined
Jul 30, 2013
Messages
468
Office Version
  1. 2019
Platform
  1. Windows
1. Select all the cells in column H you want to conditionally format.
2. Home>Conditional Formatting>New Rule>Use a formula.
3. Formula is: =AND($H3<=$P3,$H3<>"",$P3<>"")
4. Choose format and click OK
5. Select all the cells in column P you want to conditionally format.
6. Home>Conditional Formatting>New Rule>Use a formula.
7. Formula is: =AND($P3<=$H3,$H3<>"",$P3<>"")
8. Choose format and click OK
Thank you.
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,492
Messages
5,764,686
Members
425,230
Latest member
DzOus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top