Ik tracht een macro op te nemen die van een selectie via conditional format de max aanduidt en highlight..ik sukkel momenteel met het deel waarin ik zeg dat hij elke cel moet vergelijken met de max van de selcetie
Heb ook al geprobeerd met onderstaande code, maar werkt ook niet.. iemand een idée?
alvast hartelijk bedankt!!
Code:
Sub maximum()
'
'highlights the maximum in the selection
'
RowCount = Selection.Rows.Count
colcount = Selection.Columns.Count
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
[B]"=AND(RC=MAX(RC:RC[rowcount])"[/B]
Selection.FormatConditions(1).Interior.ColorIndex = 3
End Sub
Code:
Sub maximum()
'
'highlights the maximum in the selection
'
RowCount = Selection.Rows.Count
colcount = Selection.Columns.Count
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
[B]"=AND(RC=MAX(selection)"[/B]
Selection.FormatConditions(1).Interior.ColorIndex = 3
End Sub
alvast hartelijk bedankt!!