+ Reply to Thread
Results 1 to 5 of 5

macro to swap columns

  1. #1
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    macro to swap columns

    Hi champs,


    pls help me with a macro to swap any two columns.

    for example i need to swap column A to column Z?

    Thanks in advance.

  2. #2
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: macro to swap columns

    google

    http://superuser.com/questions/62519...ft-excel-sheet

  3. #3
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: macro to swap columns

    Try this:-
    Please Login or Register  to view this content.
    Regards Mick

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,445

    Re: macro to swap columns

    Hi,

    Try this:
    Please Login or Register  to view this content.
    In the immediate window use this code to perform the above macro.
    call swapcolumns("A","B")

    Change A and B for any two column letters you want to swap.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    Re: macro to swap columns

    Thanks all.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] swap two columns from selection of three columns (not whole column)
    By jed38 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-27-2013, 08:18 AM
  2. Swap columns
    By Costasg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2011, 03:27 PM
  3. Swap Columns A and B
    By opg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-09-2008, 04:50 PM
  4. Swap Columns A and B
    By opg in forum Excel General
    Replies: 1
    Last Post: 11-07-2008, 01:43 PM
  5. Swap Columns?
    By jcblinger in forum Excel General
    Replies: 3
    Last Post: 07-30-2008, 11:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1