title: Is there a limit to how many cells I can assign to an array?
body: <p>I am trying to assign all the values from a column to an array using VBA.</p>
  <pre><code>Dim all_datapoints() As Variant
  
  With ActiveSheet
      'get number of datapoints in the desired column
      n = .Cells(1, 4).End(xlDown).Row
  
      'assign column values to array
      all_datapoints = Application.Transpose(.Range(.Cells(1, 4), .Cells(n, 4)))
  
  End With
  </code></pre>
  <p>The value of n is about 240,000 but the array all_datapoints() only contains 42,783 datapoints. I looked over my datasheet and there are no N/A, Error, or missing values in this column (should just be a column of strings). I am not sure why it refuses to get the rest of the data.</p>
  <p>Even if I include <code>ReDim all_act_molecules(1 to n)</code> before assigning the range, it limits to only grab the first 42,783 values. Help!</p>