Im having some trouble with Target.Column / Target.Row syntax.
The code below is a snippet of a conditional formatting problem that I posted about yesterday. I have been working on it since but cant seem to get it too work.
When the if statements read:
If Target >= (Range("H" & Target.Row).Value + Range("O15").Value + 2) Then icolor = 45
rather than
If Target >= (Range("H" & Target.Row).Value + Range(Target.Column & "15").Value + 2) Then icolor = 45
They work, but obviously this is only relevant for column O.
Any idea what I'm doing wrong??
Dim icolor As Integer
If Not Intersect(Target, Range("o16:ao35")) Is Nothing Then
If Target = "" Then icolor = 2
If Target >= (Range("H" & Target.Row).Value + Range(Target.Column & "15").Value + 2) Then icolor = 45
If Target >= (Range("H" & Target.Row).Value + Range(Target.Column & "15").Value + 10) Then icolor = 38
Target.Interior.ColorIndex = icolor
End If
Bookmarks