Highlight maximum value

DHAWAL

New Member
Joined
Oct 10, 2022
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
Can you provide my any macro in excel that will highlight maximum value from multiple columns? It will compare value of multiple columns and will highlight maximum value. Further the column will be random like A1, C1,F1,H1,I1,N1 etc, It should compare value with other multiple columns and not with row. Further it should allow same macro to apply to all other rows across multiple columns.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
You don't need VBA for this, you should just be able to use Conditional Formatting, using the MAX function.

Here is how you do it:
1. Select each cell in your range A1,C1,F1,H1,I1,N1 so that A1 is the last cell you select.
2. Go to Conditional Formatting and select "New Rule"
3. Select the "Use a formula to determine which cells to format" option
4. Enter the following formula:
Excel Formula:
=MAX($A$1,$C$1,$F$1,$H$1,$I$1,$N$1)=A1
5. Click the Format button and go to the Fill tab
6. Select your desired highlighting color
7. Click "OK" twice

This should do what you want (see example below):

1709813408598.png
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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