+ Reply to Thread
Results 1 to 2 of 2

How to sort sheets within workbook?

  1. #1
    Forum Contributor VAer's Avatar
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    808

    How to sort sheets within workbook?

    Just make an example, there are 3 sheets (in real case, there could be hundreds of sheets within the workbook, so I need program to do that, 3 sheets as example, just want to explain the issue): from left tab to right tab, the sheet names are ABC_0030 , ABC_0005, ABC_0015

    All sheet name has 8 characters, first 4 characters are same, last four characters are numeric.

    Under Developer > Visual Basic Microsoft Excel Object: ABC_0030 could be Sheet1 or Sheet2 or Sheet3 , but I don't care about this piece of information. I want to sort the sheets based on its actual tab name.

    Goal: I would like to sort the sheets based on last four numeric characters, from smallest to largest, so that ABC_0005 should be the tab on the left, ABC_0015 should be in the middle, and ABC_0030 should be the last tab on the right.

    How should I write the VBA code to sort the tabs.

  2. #2
    Forum Contributor VAer's Avatar
    Join Date
    09-10-2016
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    808

    Re: How to sort sheets within workbook?

    https://learn.microsoft.com/en-us/of...ically-by-name

    I think I found the code online.

+ 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. need to sort three sheets differently in same workbook
    By sagikerius in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-23-2017, 01:51 PM
  2. VBA to sort sheets in a Workbook
    By Taisir in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2016, 09:08 AM
  3. [SOLVED] Auto-populate and sort data to a master worksheet from other sheets in a shared workbook
    By Gemma_g1985 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-29-2014, 10:47 PM
  4. Macro to sort data,match and paste in to relevant sheets on same workbook
    By Benjamin2008 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-08-2009, 07:58 AM
  5. Sort Totals & Linking Sheets in a Workbook
    By eddonaldson in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-20-2009, 11:51 AM
  6. Sort Totals & Linking Sheets in a Workbook
    By eddonaldson in forum Excel General
    Replies: 0
    Last Post: 05-20-2009, 08:04 AM
  7. [SOLVED] how can I sort sheets within a workbook in excel
    By piagax2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-29-2005, 06:30 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