title: How to Find the Length of a Column in VBA with a Variable Last Row
body: <p>I'm a beginner to vba and hope to use it in order to automate a process. I have a computer program that provides me an excel spreadsheet, where the amount of data in the columns can change. For example, I could have a column of length 9 one time:</p>
  
  <p>1</p>
  
  <p>3</p>
  
  <p>2</p>
  
  <p>4</p>
  
  <p>24</p>
  
  <p>23</p>
  
  <p>432</p>
  
  <p>55</p>
  
  <p>2</p>
  
  <p>Or a column of length 5 (note: actual column sizes are usually in the thousands):</p>
  
  <p>1</p>
  
  <p>2</p>
  
  <p>3</p>
  
  <p>4</p>
  
  <p>8</p>
  
  <p>I want to write code that will grab this column, not knowing how long the column will be. Something like:</p>
  
  <pre><code>Dim list1 As Array
  'I don't know how to find the upper bound
  list1 = Range("A1:A" &amp; Upper Bound).Value
  </code></pre>
  
  <p>Any help is appreciated. Thanks!</p>