Max values entered and format

  • Thread starter Thread starter Mark
  • Start date Start date
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top