Possible to arrange spreadsheet by either name or date?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The subject line may not be clear, but what I want to know is if there's an
option in Excel that aloows me to choose the arrangment of my spreadsheet
(either numerically or alphabetically). Can someone plese help me.
 
I guess I should have told you, when you get the Sort dialogue box
Choose Options and Select Left to Right rather than Top to Bottom.

---GJ
 
Okay, Sorry, ignore the last post (unless you want to sort columns vs
rows), I was just reading the another post & got my responses mixed
up....
 
You need a VBA to sort your sheets alphabetically.

Sub SortALLSheets()
'sort sheets within a workbook in Excel 7 -- Bill Manville
'modified to sort all sheets instead of just worksheets
Dim iSheet As Integer, iBefore As Integer
For iSheet = 1 To ActiveWorkbook.Sheets.Count
Sheets(iSheet).Visible = True
For iBefore = 1 To iSheet - 1
If UCase(Sheets(iBefore).Name) > UCase(Sheets(iSheet).Name) Then
ActiveWorkbook.Sheets(iSheet).Move
Before:=ActiveWorkbook.Sheets(iBefore)
Exit For
End If
Next iBefore
Next iSheet
End Sub

HTH

Gilles
 
Sorry, you need to cut and paste from SUB to END SUB in your VBA editor: ALT
+ F11 and insert module in PERSONAL.XLS, that way the program shall be
available for all Excel files

Gilles
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top