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

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
2,974
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

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

JGordon11

Active Member
Joined
Jan 18, 2021
Messages
360
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
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
 

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
2,974
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Brilliant,
perfect fist time
Thanks for your help
tony
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,151,836
Messages
5,766,720
Members
425,373
Latest member
ndiejennrrd

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
Top