I am having some issues getting a If NOT Like
code to work.
Below is the part of the coding that has it. It seems like the coding is bringing over the second record that has Rail in the field being looked at, but none of the records with rail before that one or after that one.
In reality, it should be bringing over records that don't contain rail anywhere in that field but it doesn't do that either. Any feedback is appreciated.
Set rngData = Intersect(wsData.UsedRange, wsData.Range("A:K"))
j = 1
rngData.Rows(1).Copy Destination:=wsGalreq.Cells(j, 1)
For i = 2 To rngData.Rows.Count
If Not rngData.Cells(i, 11).Value = "SUPPLIER A" And rngData.Cells(i, 6).Value Like "*RAIL*" Then
j = j + 1
rngData.Rows(i).Copy Destination:=wsGalreq.Cells(j, 1)
End If
Next