title: VBA If cell is under a certain length, highlight and display message
body: <p>I'm trying to write a Macro that examines a certain column in an Excel spreadsheet looking for entries shorter than 9 characters but greater than 2, and if found, display a message and highlight the cell in which that value was found.  It might happen multiple times.  I have written the following code:</p>
  
  <pre><code>Sub Highlight()
  Dim c As Range
  Dim LR As Integer
  Dim intCell As Long
  LR = Worksheets("Basket").Cells(Rows.Count, 6).End(xlUp).Row
  For intCell = 1 To 8
  For Each c In Range("G20:G" &amp; LR).Cells
      If Len(c.Value) &lt; 9 And Len(c.Value) &gt; 2 Then
      MsgBox "One or more of the codes is invalid.  Correct the highlighted values."
      c.Cells(intCell).Interior.Color = vbYellow
      End If
  Next
  Next
  End Sub
  </code></pre>
  
  <p>I can't figure out what I'm doing wrong.  Any help would be greatly appreciated.</p>