+ Reply to Thread
Results 1 to 8 of 8

Sort sheets in a specific order

  1. #1
    Registered User
    Join Date
    05-23-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    3

    Sort sheets in a specific order

    Hello

    I have a file with around 50 tabs that are in a certain order
    When people use this file they make a copy of it and add all their inputs and unfortunately change the order of the tabs (I can't avoid that)

    The problem is that when we want to review the file each version of it has a different order so it's a mess to find anything
    I was wondering if there is a macro that would let me sort my tabs in a specific order?
    Everything I find online is about sorting alphabetically but nothing else, and i can't change the names of these tabs (there are huge macro working in this file that use this names that i don't want to brake...)

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Sort sheets in a specific order

    Have you taken a look at using the sheet index to order them?
    without a sample file to work with, can only offer suggestions, If the file was originally in a certain order and you know what each sheet index is, you can try to order them by index instead of sheet name.

    https://www.thespreadsheetguru.com/t...heet-positions

    Take a look at this example.
    If you find the suggestion or solution helpful, please consider adding reputation to the post.

  3. #3
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,307

    Re: Sort sheets in a specific order

    Possibly...
    Please Login or Register  to view this content.
    Set rg to a list of sheets in the order you want.

  4. #4
    Registered User
    Join Date
    08-15-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    9

    Re: Sort sheets in a specific order

    Here's a generic macro using sheet names for sorting alphabetically

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Sort sheets in a specific order

    Post deleted.
    Last edited by kvsrinivasamurthy; 07-28-2021 at 03:03 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Sort sheets in a specific order

    'Names' sheet is having list of sheets in required order. Code Sorts the sheets in the same order as in 'Names' sheet.
    Code for macro
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-23-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    3

    Re: Sort sheets in a specific order

    Thanks all, i'll give it a try!

  8. #8
    Registered User
    Join Date
    05-23-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    3

    Re: Sort sheets in a specific order

    Worked, thank you

+ 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. Pivot Columns Sort specific order - VBA
    By godlev in forum Excel General
    Replies: 0
    Last Post: 03-14-2019, 06:27 AM
  2. Sort Columns into a specific and predefined order
    By robertguy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2018, 06:44 AM
  3. Sort data in specific alphanumerical order
    By axtryo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2018, 11:53 PM
  4. Sort data in specific alphanumerical order
    By axtryo in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-30-2018, 11:34 PM
  5. [SOLVED] Sort 3 textboxes to get an order for a specific formula
    By stielo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-27-2015, 10:24 AM
  6. [SOLVED] Sort specific visible sheets in an order according to cells in each sheet
    By Comisar in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-14-2013, 06:57 PM
  7. [SOLVED] Macro to sort sheets into order
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-23-2012, 01:18 AM

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