Sorting multiple sheets in a workbook

R

Ron

How do I sort multiple worksheets containing columns with
similar data all at the same time? for example; if I have
10 worksheets in a workbook with the column to be sorted
containing the same type of data, I would like to sort the
same column across all worksheets. Since my data was too
large for one worksheet I had to save it with formatting
resulting in multiple worksheets. I am using excel 2000.
 
G

Gord Dibben

Ron

You cannot sort grouped worksheets with out using VBA code to cycle through
them.

Sub Sort_All_Sheets()
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Select
Range("A1").Select
Range("A1:A245").Sort Key1:=Range("A2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next ws
Application.ScreenUpdating = True
End Sub

Gord Dibben Excel MVP
 
D

Dave Peterson

And see another reply at your other post.


How do I sort multiple worksheets containing columns with
similar data all at the same time? for example; if I have
10 worksheets in a workbook with the column to be sorted
containing the same type of data, I would like to sort the
same column across all worksheets. Since my data was too
large for one worksheet I had to save it with formatting
resulting in multiple worksheets. I am using excel 2000.
 
G

Guest

Ron,

If I understand you correctly, you are trying to sort more than 65536 rows
of data. As far as I know, Excel doesn't allow sorting of data across
multiple sheets. Moreover, with that amount of data that you have, I would
propose that you use a database software like Access which is designed to
handle large amount of records.

I hope this helps.
 
G

Guest

Thank you....I'll give it a try. Not to sure how to enter
the code though.
-----Original Message-----
Ron

You cannot sort grouped worksheets with out using VBA code to cycle through
them.

Sub Sort_All_Sheets()
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Select
Range("A1").Select
Range("A1:A245").Sort Key1:=Range("A2"),
Order1:=xlAscending, Header:= _
 
G

Guest

thank you.
-----Original Message-----
Ron,

If I understand you correctly, you are trying to sort more than 65536 rows
of data. As far as I know, Excel doesn't allow sorting of data across
multiple sheets. Moreover, with that amount of data that you have, I would
propose that you use a database software like Access which is designed to
handle large amount of records.

I hope this helps.



.
 

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

Top