title: Getting value of specific column for each row
body: <p>I need to write script which allows me import data in xml format. It generates block of code I need for every order except variables. I need to go through all rows in range and get values from column "G". Problem is it gets only value of first row in range. </p>
  
  <pre><code>Dim rng As Range, row As Range
  Set rng = Range(Range("G11"), Range("G11").End(xlDown))
  For Each row In rng.Rows
  Dim partner_id As String
  partner_id = Cells(rng.row, 7).Value
  line9 = "&lt;typ:id&gt;" &amp; partner_id &amp; "&lt;/typ:id&gt;" &amp; vbNewLine
  
  ...
  </code></pre>
  
  <p>I'm not a programmer as you can see, but I really need to get that partner_id. I would appreciate any suggestions.</p>