title: VBA Len Function
body: <p>I have this code in VBA:</p>
  
  <pre><code>For x = 4 To 3918
      If InStr(Cells(x, 2), "LW") Then
          numToFind = Cells(x, 1)
          For y = 4 To 3918
              If Cells(y, 1) = numToFind Then
                  Cells(y, 1).EntireRow.Interior.ColorIndex = 4
              End If
          Next y
      End If
  Next x
  </code></pre>
  
  <p>However, I am trying to change the condition from "if cell x,2 contains string "LW"" to "if cell x,2 contains 5 characters..." in line 2. I am having trouble properly using the len() function. Can someone please help?</p>
  
  <p>Thank you!</p>