+ Reply to Thread
Results 1 to 7 of 7

Sorting worksheets by specific order

  1. #1
    Registered User
    Join Date
    07-09-2010
    Location
    NJ
    MS-Off Ver
    Excel 2003
    Posts
    6

    Sorting worksheets by specific order

    Hello all,

    I have the following problem, each month I receive a file with about 87 worksheets and they are not arranged in any order. Each month I have to sort the tabs in a specific order as they need to be sorted by region. Is there a way to have a macro sort them automatically. The tab names are always the same and it's not by alpha. For example when the file comes in the order is Huntsville, Kent, Delano, Union, Bristol, but the correct order needs to be Bristol, Union, Huntsville, Kent, Delano and I do this manually each month. The order is always the same. Is there a way to automate this?

    Any help is greatly appreciated.

    Thank you.

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Sorting worksheets by specific order

    there are a bunch of ways to move WS around. And since you are not asking to put them in Alpha order or numeric order, this might work...it's labor intensive at the beginning because you have to setup each WS, but then you are done...you can add it to your personal.XSLB or create as an add-in...

    Please Login or Register  to view this content.
    just change the names of the sheets and change the order of where you want them....HTH
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

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

    Re: Sorting worksheets by specific order

    Hi DMP,

    JudgeH above is correct but because you always get them in the same order you can try this.

    Turn on your Macro Recorder and sort them like you want. Then turn it off and save the macro. Get the workbook again and run the macro. It will look a lot like his macro above but should have the correct sheet names. I think you can figure out what it is doing and modify the macro to fit your needs. You might not need to change anything from the recorded macro.

    Read: http://www.excel-easy.com/vba/create-a-macro.html to insure you show the Developer Tab.
    Also Read http://www.exceldemy.com/how-to-crea...acro-recorder/ for another example.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Sorting worksheets by specific order

    Actually that was how I did it....thanks MP

  5. #5
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Sorting worksheets by specific order

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-09-2010
    Location
    NJ
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Sorting worksheets by specific order

    Awesome will definitely give this a try when I get the next file.

    Thank you all greatly appreciate it.

  7. #7
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Sorting worksheets by specific order

    Glad we could all help....

    If this has been completed to your satisfaction, please set the thread to Solved...If you feel we deserve an increase in our reputation, feel free to click on the star in the lower left of the thread. Remember, someday when you help somebody they may add to your rep points, and it could be us...just a thought...

+ 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] sorting in specific order
    By nth34 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-02-2015, 01:46 AM
  2. Printing worksheets in a specific order
    By mailrail in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-27-2015, 03:02 PM
  3. VBA Code to PDF a List of Specific Worksheets in Order
    By mbhart in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2014, 06:11 PM
  4. Searching worksheets in a specific order
    By sew2009 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 01-01-2011, 11:57 AM
  5. Sorting Worksheets in numeric order.
    By CParnell in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2007, 07:30 PM
  6. print specific worksheets in specific order.
    By jarvo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2006, 06:10 AM
  7. Ordering Worksheets:specific order
    By PGalla06 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2005, 05:15 PM

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