title: How to Loop Through 5 Cells in a Row Using Excel VBA
body: <p>I want to loop through 5 cells, Q5 - U5.</p>
  
  <p>With each cell I want to check if the value is equal to "Y", and if yes, highlight the cell to make it green.</p>
  
  <p>How may I do so? Can't seem to figure it out.</p>
  
  <pre><code>For Each c In Range("Q5:U5").Cells
  c.Select
  If c.Value = Y Then
  With Selection.Interior
      .Pattern = xlSolid
      .PatternColorIndex = xlAutomatic
      .Color = 5287936
      .TintAndShade = 0
      .PatternTintAndShade = 0
  End With
  End If
  Next
  </code></pre>