Range("F6:F38").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$F$1 = ""PH"""
Selection.FormatConditions(1).Interior.Pattern = xlGrid
End Sub
I am not very clever when it come to writing macros ,
Step 1 - but what I am trying to achieve is that if I move to a new cell Eg Cell j6, then it would highligt J6:J38 instead of always going back to Range("F6:F38").Select.
Step 2 - this has to apply to 1st cell in that range not "=$F$1 = ""PH"""
"=$J$1 = ""PH"""
so everytime I move a col it needs to re-adjust the formula to the currenct col number
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$F$1 = ""PH"""
Selection.FormatConditions(1).Interior.Pattern = xlGrid
End Sub
I am not very clever when it come to writing macros ,
Step 1 - but what I am trying to achieve is that if I move to a new cell Eg Cell j6, then it would highligt J6:J38 instead of always going back to Range("F6:F38").Select.
Step 2 - this has to apply to 1st cell in that range not "=$F$1 = ""PH"""
"=$J$1 = ""PH"""
so everytime I move a col it needs to re-adjust the formula to the currenct col number