I have about 4000 lines of data I want to sort in columns I - M
they are numerical from 1 to 40 and want to sort the rows left to right
lowest to highest. I can do it individually but would like to do it a lot faster.
if I use the the multiple "then by" boxes it still changes the first selection
but does not do the rest instead it just does some other kind of sorting.
Not sure what I'm missing here.
Tried to create a macro but did not get that to work either.
Waddaya Recon?
G.
I think you would need to use VBA - either iterate the data set and apply the Sort on a row by row basis or push the data into an Array and sort the Array before pasting back to the sheet.
The former is perhaps more obvious to work through and with 4000 lines of data (I:M) should not prove too slow ... in basic terms:
Modify sheet & range references etc to suit own requirements.Sub Example() Dim rngRow As Range On Error Resume Next Application.ScreenUpdating = False With Sheets("Sheet1") For Each rngRow In .Range(.Cells(2, "I"), .Cells(.Rows.Count, "M").End(xlUp)).Rows With rngRow .Sort .Cells(1), xlAscending, Orientation:=xlSortRows End With Next rngRow End With Application.ScreenUpdating = True End Sub
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks