title: Loop Through Used Range of specific Column in VBA Excel
body: <p>I want to get values of all cells in a specific column and add them to a list
  Here is what I have tried</p>
  
  <pre><code>Dim rng As Range
  'here ColumnName will be like "A", "B" etc...
  'and SheetName will be like "Sheet001", "Sheett002" etc...
  rng = ThisWorkbook.Sheets(SheetName).Columns(ColumnName).UsedRange
  For Each cell In rng.Cells
  If Not cell.Value = "" Then
  ListBox1.AddItem (cell.Value)
  End If
  Next
  </code></pre>
  
  <p>But I am not being able to determine how to get used range of column by its name.
  The data I want to read will be like this in a separate sheet</p>
  
  <p><a href="https://i.stack.imgur.com/hIzHA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hIzHA.jpg" alt="enter image description here"></a></p>