title: Excel/VBA - Loop through range
body: <p>I have the following code:</p>
  
  <pre><code>TotalCount = Application.Sum(Worksheets("Data").Range("B14:G14"))
  Sheets("Data").Range("H14") = TotalCount
  TotalCount = Application.Sum(Worksheets("Data").Range("B13:G13"))
  Sheets("Data").Range("H13") = TotalCount
  TotalCount = Application.Sum(Worksheets("Data").Range("B12:G12"))
  Sheets("Data").Range("H12") = TotalCount
  TotalCount = Application.Sum(Worksheets("Data").Range("B11:G11"))
  Sheets("Data").Range("H11") = TotalCount
  </code></pre>
  
  <p>As you can see... it's not very efficient. Problem is, i cant find a loop solution to make it better. When i try to create a loop i either get results i dont expect or it doesnt work. I'm at the point where i need some help... help! And thank you in advance.</p>