Hi,

I have a spreadsheet with 30 columns and around 2,500 rows per column. The columns are an extract from a SharePoint instance and are not in the order I need them to be in for my purposes (import into another system).

I have a macro that prepares the data with various actions, including echoing a previously recorded cut & paste actions, something like this:

    Columns("AA:AB").Select
    Selection.Cut
    Columns("A:A").Select
    Selection.Insert Shift:=xlToRight
    Columns("H:H").Select
    Selection.Cut
    Columns("C:C").Select
    Selection.Insert Shift:=xlToRight
    Columns("H:H").Select
    Selection.Cut
    Columns("D:D").Select
    Selection.Insert Shift:=xlToRight
    Columns("I:J").Select
    Selection.Cut
    Columns("E:E").Select
    Selection.Insert Shift:=xlToRight
... however I think that's a bit rubbish and not nearly as efficient as it could be. It certainly slows my laptop down when it's running!

I'd prefer to have a way of listing the column names in the desired order and some VBA to sort the columns into that order. That would hopefully give me the flexibility to easily amend the order &/or number of columns by adding or subtracting column names from the list embedded in the VBA. Er, if that makes sense.

Can anyone help me?

Cheers

M