Using VBA to highlight highest value cells - but with a difference...

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
1,041
Office Version
  1. 365
Platform
  1. Windows
I am trying to write a macro that will highlight the highest value(s) in a range DB4:DB28 but I am struggling to ignore the values in brackets. An example of data is:
1(2), 2(4), 1(2), 3(6), 2(4), 1(2), 3(6), 2(4). I would want the two cells with 3(6) to be highlighted. I would like to use the colour: RGB(255, 255, 0).

Any ideas, please?

Mel
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about conditional formatting?

Book1
DB
41(2)
52(4)
61(2)
73(6)
82(4)
91(2)
103(6)
112(4)
121(2)
132(4)
141(2)
153(6)
161(2)
172(4)
181(2)
193(6)
201(2)
212(4)
221(2)
233(6)
241(2)
252(4)
261(2)
273(6)
281(2)
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
DB4:DB28Expression=--TEXTBEFORE(DB4,"(")=MAX(--TEXTBEFORE($DB$4:$DB$28,"("))textNO
 
Upvote 0
Solution
Thsnks, Georgieboy, I never even considered that.

Mel
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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