Hi all -
I would like to apply different conditional formatting at different times with a click of a button
I setup a dummy and turned on the recorder and recorded this
Code
Range("A7:N7").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$C7=1"
Selection.FormatConditions(1).Interior.ColorIndex = 37
Range("A1").Select
End Sub
I tried changing to this
Code
'/Conditional Format - OTHER EXPENSE B/L
Set rngConditional = wsData.UsedRange
With rngConditional
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=$E2=OTHER EXPENSE B/L"
.FormatConditions(1).Interior.ColorIndex = 37
End With
wsData.Range("A1").Select
But it is returning error
QuoteRun-time error '5':
Invalid procedure call or argument
Here
The range being considered is A:S of unknown rows
Thanks
-marc