VBA if with InStr
<p>I'm trying to write a VBA code with if the i get an error.</p>

<p>I want the code to check if one of the values  ("S925,S936,S926,G") is not on cell 10.</p>

<pre><code>Sub checklist()

 Dim x
Dim LineType

NumRows = Cells(Rows.Count, "j").End(xlUp).Row

For x = 2 To NumRows

    If LineType = "G" Then
        If Not InStr("S925,S936,S926,G", cellsCells(x, 10).Value) Then
       cells     Cells(x, 52).Interior.Color = rgbCrimson
       cells     Cells(x, 52).Value = "G"


 End If
      End If


    End If

Next x


End Sub
</code></pre>