kurtwagner
12-06-2012, 06:07 AM
Hello, I'm working on a macro to change the color of the row between column W to AN if in column K the value is "FCA" (without quotes).
So far I have this, but it doesn't work:
Sub Test()
For Each cell In Range("K1", Cells(Rows.Count,
"K").End(xlUp))
If InStr(1, cell, "FCA")
Then
Range("W" & cell.Row & ":AN" &
cell.Row).Interior.ColorIndex = 3
End If
Next
cell
So far I have this, but it doesn't work:
Sub Test()
For Each cell In Range("K1", Cells(Rows.Count,
"K").End(xlUp))
If InStr(1, cell, "FCA")
Then
Range("W" & cell.Row & ":AN" &
cell.Row).Interior.ColorIndex = 3
End If
Next
cell