Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Highlight the Entire Row for the Largest Sales Value

Sub HighlightWholeRow()     With Range("D2:F15")         .Select         .FormatConditions.Delete         .FormatConditions.Add Type:=xlExpression,Formula1:="=$F2=MAX($F$2:$F$15)"         .FormatConditions(1).Interior.Color = RGB(255, 0, 0)     End With End Sub