Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Sorting sheets

I have a book with a lot of sheets ( more then 200) , is it possible to
sort sheets in alphabetical order,
Thanks in advance


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Sorting sheets

Chip Pearson has documented some code to do this:

http://www.cpearson.com/excel/sortws.htm

--
Regards,
Tom Ogilvy

"emilija" wrote in message
...
I have a book with a lot of sheets ( more then 200) , is it possible to
sort sheets in alphabetical order,
Thanks in advance




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Sorting sheets

'sort all sheets in workbook
'on first letter of sheet name

Sub SortSheets()
Dim shCount, i, j As Long

shCount = Worksheets.Count

For i = 1 To shCount
For j = i + 1 To shCount
If Asc(Left(Worksheets(j).Name, 1)) < _
Asc(Left(Worksheets(i).Name, 1)) Then
Worksheets(j).Move Befo=Worksheets(i)
End If
Next j
Next i

End Sub

I hope, it is helpful.

--
Sorry for my language, I'm still learning
losmac

Użytkownik "emilija" napisał w wiadomo¶ci
...
I have a book with a lot of sheets ( more then 200) , is it possible to
sort sheets in alphabetical order,
Thanks in advance




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Countif, Sorting = Two Sheets RJB Excel Discussion (Misc queries) 0 April 7th 10 12:13 AM
help sorting multiple sheets Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 7 May 21st 08 08:31 PM
sorting sheets Tim Twilley New Users to Excel 2 June 28th 07 11:06 PM
Sorting sheets Lp12 Excel Discussion (Misc queries) 3 June 11th 06 05:28 PM
Sorting Data to Different Sheets ccoverne Excel Worksheet Functions 1 November 10th 04 09:20 PM


All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"