The below code formats any row column B to N which has a value greater than 30 (in column O)
What I need now is to highlight the row if column O equal to "CHECK". The below code doesn't seem to work. Any ideas? Also, how would the code be tweaked to use the last row method instead of specifying a range?
End Sub
VBA Code:
Sub FormatRangeEQUITIES()
Range("$B$5:$O$500").Select
With Range("$B$5:$O$500")
.FormatConditions.DELETE
.FormatConditions.Add Type:=xlExpression, Formula1:="=$O5 >= 30"
.FormatConditions(1).Interior.ColorIndex = 37
End With
End Sub
What I need now is to highlight the row if column O equal to "CHECK". The below code doesn't seem to work. Any ideas? Also, how would the code be tweaked to use the last row method instead of specifying a range?
VBA Code:
Sub FormatCHeck()
Range("$B$5:$O$500").Select
With Range("$B$5:$O$500")
.FormatConditions.Add Type:=xlExpression, Formula1:="=$O5 =""CHECK"""
.FormatConditions(1).Interior.ColorIndex = 37
End With
End Sub
Last edited by a moderator: