ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Highlight highest figures (https://www.excelbanter.com/excel-programming/389901-highlight-highest-figures.html)

Mamabear

Highlight highest figures
 
Is there a macro I could use to find the highest figure in a column and make
it bold?

Thanks

Bob Phillips

Highlight highest figures
 
Use conditional formatting.

See http://www.xldynamic.com/source/xld.CF.html#top3

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Mamabear" wrote in message
...
Is there a macro I could use to find the highest figure in a column and
make
it bold?

Thanks




Mike H

Highlight highest figures
 
If you really want a macro then try this worksheet code:-

Sub highlightmaximum()
Dim rcell As Range
Dim Myrange As Range
Dim maxval As Variant
Set Myrange = Range("A1:A100") '<Change to suit
maxval = Application.WorksheetFunction.Max(Myrange)
For Each rcell In Myrange
rcell.Interior.ColorIndex = xlNone
If rcell.Value < "" Then
If rcell.Value = maxval Then
rcell.Interior.ColorIndex = 6
rcell.Font.Bold = True
End If
End If
Next
End Sub

Mike

"Mamabear" wrote:

Is there a macro I could use to find the highest figure in a column and make
it bold?

Thanks



All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com