Monday, December 13, 2010

Move Columns in Excel using VBA

Here's a sample VBA code that can be used to move data from Column AA in the Excel sheet to Column C.

    'Move column AB to C
    Columns("AB:AB").Select
    Application.CutCopyMode = False
    Selection.Cut
    Range("C1").Select
    Selection.Insert Shift:=xlToRight

No comments: