title: Looping to find letters in a column on VBA
body: <p>My macro is to send emails for some clients. It sends the email only if there is a X at one of the lines of the column B, so then it sends the whole line to the client by creating a new sheet that goes attached to the client on the email.
  The problem is that I need to create a loop to count all the columns that contain the letter X, because this macro is counting only the first line that contains the letter X and then the other ones don't go to the new sheet and consequently it doesn't go to the client. Everything is OK in my macro, despite of the counter. When i run it, just the first line that contains the X goes to the client, and the others don't. Can you guys help me?</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>LinhaInicio = 1
  While Workbooks(planilha).Sheets("Boletas").Cells(LinhaInicio, 2) &lt;&gt; "X"
      LinhaInicio = LinhaInicio + 1
  Wend
  LinhaFim = LinhaInicio
  While Workbooks(planilha).Sheets("Boletas").Cells(LinhaFim, 2) = "X"
      LinhaFim = LinhaFim + 1
  Wend
  LinhaFim = LinhaFim - 1
  RangeInicio = Workbooks(planilha).Sheets("Boletas").Cells(LinhaInicio, 26).Address
  RangeFim = Workbooks(planilha).Sheets("Boletas").Cells(LinhaFim, 34).Address
  Set RangeCopiar = ActiveSheet.Range(RangeInicio, RangeFim)
  </code></pre>