title: How can I copy columns from one sheet to another with VBA in Excel?
body: <p>I'm trying to write a macro that copies the content of column 1 from sheet 1 to column 2 on sheet 2. This is how the module looks like but, when I run it, I get</p>
  
  <blockquote>
    <p>Run time error 9, Subscript out of range.</p>
  </blockquote>
  
  <pre><code>Sub OneCell()
      Sheets("Sheet1").Select
      'select column 1 A1'
      Range("A1:A3").Select
  
      Selection.Copy
      Range("B1:B3").Select
  
      ActiveSheet.Paste
  
      Sheets("Sheet2").Select
      Application.CutCopyMode = False
  End Sub
  </code></pre>