I am adding in a column in a long macro and then I need to add conditional formatting to that column in VBA. Struggling.
I need to compare column V to lastrow to column P to lastrow and have it one color or another.
This is part of what I had so far but not sure how to define i to mean to use the current row... so I got stuck. Hellllp =D
Sub JP_AddConditions()
With Range("V" & i).FormatConditions
.Add Type:=xlExpression, Operator:=xlEquals, Formula1:="=$P$" & i & "<>$V$" & i
End With
Range("V" & i).FormatConditions(1).Interior.ColorIndex = 6
End Sub
Bookmarks