Highlight column on minimum condition

sachin483

Board Regular
Joined
Mar 31, 2015
Messages
163
Office Version
  1. 2019
Platform
  1. Windows
i have 2 column from which i have arrived minimum value of 2 column like that i have around 65000 thousands row from which i want to highlighted the cell column from which minimum condition has arrived and if the value of both the column is similar then the first column should get highlighted

[TABLE="width: 238"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]col 1[/TD]
[TD]col2[/TD]
[TD]RESULT[/TD]
[/TR]
[TR]
[TD="align: right"]18411768[/TD]
[TD="align: right"]18411768[/TD]
[TD="align: right"]18411768[/TD]
[/TR]
[TR]
[TD="align: right"]6480131[/TD]
[TD="align: right"]1701180[/TD]
[TD="align: right"]1701180[/TD]
[/TR]
[TR]
[TD="align: right"]2867699[/TD]
[TD="align: right"]2170980[/TD]
[TD="align: right"]2170980[/TD]
[/TR]
[TR]
[TD="align: right"]415368[/TD]
[TD="align: right"]415368[/TD]
[TD="align: right"]415368[/TD]
[/TR]
[TR]
[TD="align: right"]4642704[/TD]
[TD="align: right"]3682704[/TD]
[TD="align: right"]3682704[/TD]
[/TR]
[TR]
[TD="align: right"]1598838[/TD]
[TD="align: right"]910032[/TD]
[TD="align: right"]910032[/TD]
[/TR]
[TR]
[TD="align: right"]341711[/TD]
[TD="align: right"]31644[/TD]
[TD="align: right"]31644[/TD]
[/TR]
[TR]
[TD="align: right"]415368[/TD]
[TD="align: right"]6480131[/TD]
[TD="align: right"]415368[/TD]
[/TR]
[TR]
[TD="align: right"]2867699[/TD]
[TD="align: right"]3682704[/TD]
[TD="align: right"]2867699[/TD]
[/TR]
[TR]
[TD="align: right"]415368[/TD]
[TD="align: right"]410032[/TD]
[TD="align: right"]410032[/TD]
[/TR]
[TR]
[TD="align: right"]4642704[/TD]
[TD="align: right"]4442704[/TD]
[TD="align: right"]4442704[/TD]
[/TR]
[TR]
[TD="align: right"]1598838[/TD]
[TD="align: right"]1618838[/TD]
[TD="align: right"]1598838[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
You don't necessarily need the RESULT column. For the conditional formatting, you should choose "Use a formula to determine this formula is true:" and assuming your col 1 heading is in cell A1, the formula should be =IF(AND(A2=MIN($A2:$B2),$A2<>$B2),TRUE,IF(AND($A2=$B2,COLUMN()=COLUMN($A$2)),TRUE,FALSE))

The range your conditional formatting applies to should be the full range of your data; I've deleted the $ signs in the above formula to allow it to follow down the full range.
 
Last edited:
Upvote 0
thanks for the formula as per the formula if the result is true then it is column 1 and for false its column 2 right
 
Upvote 0

Forum statistics

Threads
1,223,977
Messages
6,175,753
Members
452,667
Latest member
vanessavalentino83

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
Back
Top