+ Reply to Thread
Results 1 to 6 of 6

Sorting Excel Spreadsheets

  1. #1
    Registered User
    Join Date
    08-12-2010
    Location
    detroit,MI
    MS-Off Ver
    Excel 2007
    Posts
    5

    Question Sorting Excel Spreadsheets

    Hi,

    I have an excel workbook with 200 sheets numbered 1 to 200 and a summary sheet. I want to be able to sort these sheets based on values of a column(Column A) of the summary sheet. Could someone let me know if it is even possible and if so how to do it. Any help is much appreciated!

    Thanks a lot!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting Excel Spreadsheets

    Post up a sample workbook with 4 sheets and your summary sheet showing the layout/data/sorting criteria. We can help from there.

    Click GO ADVANCED and use the paperclip icon to post up a desensitized copy of your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-12-2010
    Location
    detroit,MI
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Sorting Excel Spreadsheets

    Thanks! .. I posted a sample workbook.I have a "summary " sheet and a "master" sheet (contains the template for all other sheets) followed by individual sheets for each issue written up in the summary. Please read through the following for a detailed explanation:

    1. Add New Issue: What this macro does is it creates a copy of the master sheet renames it to match with the issue number being written and hyperlinks Cell A8 of Summary sheet to Cell A1 of the respective Issue sheet. This macro also inserts a new line (Row 8) each time a new issue is written. I had to do this because the individual issue sheets pull information (ie priority, status and issue description ) from the summary sheet so that when i type in data in the summary sheet, the respective issue sheet automatically gets populated.

    2.Problem with sorting: The problem arises when i try to sort the summary sheet according to either priority or status since the issue sheets always pull data from Row 8 of the summary sheet. So whenever i sort, my data on the issue sheets change.

    Im guessing if I am able to sort the sheets in a similar way to the sorting on the summary sheet and have them sorted by column A, I could retain all my data. Please let me know if there is any other way too. Thanks for all the help and let me know if you need any additional information.

    Thanks!

    Ps: I only want the sheets after "Summary" and the "master sheet" sorted. So that would be the Sheet 3 onwards.
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting Excel Spreadsheets

    I can't say that I follow any of what you're trying to do, very chaotic description and your sample sheet has no sample data to help possibly envision your problem.

    So I'll stick to your basic question... how to sort sheets based in the order of cells in column A on the Summary sheet.

    Assuming these sheets actually exist, this macro will sort the sheets in the order displayed on your Summary sheet.

    Please Login or Register  to view this content.

    Any sheets NOT listed on the Summary sheet will end up at the beginning of your workbook.

  5. #5
    Registered User
    Join Date
    08-12-2010
    Location
    detroit,MI
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Sorting Excel Spreadsheets

    Thanks a lot! The code is exaclty what I was looking for and sorry for being so confusing. However there is one more thing I would need help would. Could you send me a code to rename the sheets based on values in column A.

    PS: Again I dont want the first two sheets renamed.

    Thanks a lot for all your help!

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting Excel Spreadsheets

    The values you have in column B must be legal strings for sheet names, I'll let you figure out how to make sure column B values are legal.

    Please Login or Register  to view this content.

+ 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