Sub SortSheetbyName()
Application.ScreenUpdating = False
Dim ShCount As Integer, i As Integer, j As Integer
ShCount = Sheets.Count
For i = 1 To ShCount – 1
For j = i + 1 To ShCount
If Sheets(j).Name < Sheets(i).Name Then
Sheets(j).Move before:=Sheets(i)
End If
Next j
Next i
Application.ScreenUpdating = True
MsgBox “All sheets sorted!”
End Sub
Like this:
Like Loading...
Related
Author: dilipramadas
https://www.dilipramadas.com I'm Dilip Ramadas. By profession, I’m a Business Analyst. In my career, I’ve worked as an employee, freelance, and also consultant in my spare time. My job greatly revolves around researching new tech in a given industry, research for locations for a new startup, marketing/product placement strategies, analytics, and automation. While doing so I have always tried my best to learn as is possible. My interest areas are analytics, MS Excel, VBA, WordPress, Learning, Organic farming, etc.