Hello.
I need a code to go trough a list and check each cell if they contain a string out of a list of possible strings (around 30 dif strings). If the cel do not contain any of those strings than paint the cell. I tryed something here, but its not working.
Code:
Sub Verificação_Comentário()
Dim rw As Long, LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
For rw = 3 To LR
If InStr(1, Range("J3" & rw).Value, "AGUARDANDO REVISÃO", vbBinaryCompare) Then
ElseIf InStr(1, Range("J3" & rw).Value, "ATENDIDO", vbBinaryCompare) Then
ElseIf InStr(1, Range("J3" & rw).Value, "ATENDIDO ECODE", vbBinaryCompare) Then
ElseIf InStr(1, Range("J3" & rw).Value, "ATENDIDO PVE", vbBinaryCompare) Then
Else
Range("J3" & rw).Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End If
Next rw
End Sub
End code.
I cut some strings out to shorten the post.
Bookmarks