+ Reply to Thread
Results 1 to 3 of 3

Rearrange selected columns automatically

  1. #1
    Registered User
    Join Date
    06-21-2013
    Location
    bangalore
    MS-Off Ver
    Excel 2003
    Posts
    1

    Rearrange selected columns automatically

    Hi,
    Daily I am getting a file which have so many columns with different names. I used to select and move my required columns to separate place. For exp.

    I have the file with various columns, such are.
    Sales Qty, Year, Tax, Company Code, Discount Paid, Sales Amount, Company Name

    The above column order are not constant, daily the order will changes. But we have to make the order as below

    Company Name, Company Code, Year, Sales Qty, Sales Amount, Tax, Discount Paid

    Like this we have so many columns in the file and we used to rearrange as required.

    So please advise me the solution like any formula or any macro to avoid this manual work with error, so that i will save my time and free from error.

    Thanks in advance.
    Sujit

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Rearrange selected columns automatically

    Hi Sujit,
    Could you please attach a workbook to your thread? It would be nice to have one sheet being as you receive your data and another one with your manipulation done. This way, we can work a macro that will do it automatically.
    Regards
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: Rearrange selected columns automatically

    Hi and welcome to the forum

    If the headings will be EXACTLY same each time - even if they are in a different order - you cam probablu use the index/match/match functions to give you what you need. Play around with that for a while and if you still cant manage it, as p24leclerc suggests upload a sample workbook
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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