Sort multiple tabs
Results 1 to 4 of 4

Thread: Sort multiple tabs
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Feb 2018
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Sort multiple tabs

    Thank you in anticipation.

    I have multiple tabs on a worksheet that are ordered thus (the numerals are times but set as text):

    Bus 14.10 Bus 14.40 Bus 15.10 Car 14.15 Car 14.45 Car 15.15 Plane 14.20 Plane 14.50 Plane 15.20

    I would like to sort the tabs in TIME order.

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    25,685
    Post Thanks / Like
    Mentioned
    445 Post(s)
    Tagged
    45 Thread(s)

    Default Re: Sort multiple tabs

    How about
    Code:
    Sub BakerBaker()
       Dim i As Long, j As Long
       For i = 1 To Sheets.Count - 1
          For j = i + 1 To Sheets.Count
             If Val(Split(Sheets(i).Name)(1)) > Val(Split(Sheets(j).Name)(1)) Then
                Sheets(i).Move , Sheets(j)
             End If
          Next j
       Next i
    End Sub
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #3
    New Member
    Join Date
    Feb 2018
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Sort multiple tabs

    Brilliant, that works fine - puts all tabs in timed order just as I wished.
    Thanks for doing this so quickly - provided a very convenient feature.

  4. #4
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    25,685
    Post Thanks / Like
    Mentioned
    445 Post(s)
    Tagged
    45 Thread(s)

    Default Re: Sort multiple tabs

    You're welcome & thanks for the feedback
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •