Is it possible to arrange tabs by a group name in each tab?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,

In every sheet cell T6 I have a team name i.e "Team Tony"

Now as we go forward we will be adding new tabs with the tabs named after the person,
now what would be extremely helpful but i have no idea if possible would be to arrange (Order) the tabs by team name
So all of "Team Tony" are next to each other. etc.
if it helps I have the team names listed in control range L3:L8 so you could use this list if it make grouping then easier.
If we could also sort the tabs in alphabetical order that would be amazing.

Please help if you can
Thanks
Tony
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Try this on a copy of your workbook

VBA Code:
Sub ArrangeWS()
    Dim ws, k As Long, i As Long
    ReDim A(1 To Worksheets.Count, 1 To 2)
    For Each ws In Worksheets
        k = k + 1
        With ws
            A(k, 1) = .Name
            A(k, 2) = .[t6]
        End With
    Next
    With Application
        A = .Sort(A, 1)
        A = .Sort(A, 2)
    End With
    For i = k To 1 Step -1
        Worksheets(A(i, 1)).Move before:=Worksheets(1)
    Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top