Max values entered and format

M

Mark

I need to be able to find the max value in a spreadsheet and highlight(bold)
that number. I need this to happen even when new data is entered
 
G

Gary''s Student

Try this worksheet event macro:

Private Sub Worksheet_Change(ByVal Target As Range)
v = Application.WorksheetFunction.Max(ActiveSheet.UsedRange)
ActiveSheet.UsedRange.Interior.ColorIndex = xlNone
For Each r In ActiveSheet.UsedRange
If r.Value = v Then
r.Interior.ColorIndex = 6
Exit Sub
End If
Next
End Sub
 
Top