I am trying to fill up my rows with colour down to the last used column.
I tried:
For i = 2 To lRow
If ActiveSheet.Range("O" & i).Value = "FULL" Then
ActiveSheet.Range ("O" & i), Cells(lCol).Interior.Color = RGB(155, 255, 0)
ElseIf ActiveSheet.Range("O" & i).Value = "NEW" Then
ActiveSheet.Range("O" & i).EntireRow.Interior.ColorIndex = 33
End If
Next
But I am getting "Application defined or object-defined error".
This code is condition-based. When the value "FULL" or "NEW" is to be found down to the last row, then the row with this value has to be highlighted. The problem is, that I don't want to use the entirerow property, as this colour is seen forever. I just need to restrict the .interior.Color property to my last column used.
How can I do that?
I found some other solutions, from where I tried to solve this issue, but in vain.