How to Copy Columns in Excel Using VBA

Written by shawn mcclain
  • Share
  • Tweet
  • Share
  • Email

Visual Basic for Applications (VBA) is a programming language that comes bundled with Microsoft Office programs, such as Excel. With VBA, you can create macros that will manipulate the Excel spreadsheet, moving the information from one cell to another, or creating formulas in a particular cell. VBA can also copy an entire column of data, so that you can paste it somewhere else.

Skill level:

Other People Are Reading


  1. 1

    Open the Excel file. Press Alt and F11 to launch the VBA console window.

  2. 2

    Click the module, on the left side of the VBA console, that holds the VBA code you want to work with. Click the right side of the screen to place your cursor in the code where you want to copy your column.

  3. 3

    Enter "Columns("A:A").Select" and "Selection.Copy" (without quotes) into the VBA console. Change the "A" to whatever column you want to copy. The two letters may be different, if you want to copy a range of cells between two columns that the letters represent.

Tips and warnings

  • The copy method also allows you to specify a destination for the copied cells. Enter "Destination:=Range("D1")" directly after the copy command, on the same line of code. Change "D1" to the cell or column where you want to paste the copied columns. If you don't include a destination, the column will be copied to the clipboard.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.