Sort Data Cross Tabs

  • Thread starter Thread starter walaw_1
  • Start date Start date
W

walaw_1

I have a very large data set in Excel that can't be placed on one page
(over 1.2 mil rows) and therefore it's been organized on multiple
tabs.

Is there a way to sort this data by date (which is a column set) in
each sheet/tab without doing it manually for each tab?
 
There is, yes, but might some of the data on say sheet 2 go before the data
on sheet 1? It would seem so, if that is the case it will be best to put it
in access first or to read it all into an array and sort that way.
 
This will cycle through all of the sheet in the active workbook and
sort each on by column A.
Sub sortEachTab()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.UsedRange.Sort Key1:=ws.Range("A2"), _
Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
Next ws
End Sub
 
Back
Top