Sort data cells in Multiple Rows

lolos

New Member
Joined
Oct 28, 2007
Messages
13
I want to sort multiple rows, at the same time but seem to only be able to do one at a time. I know that to sort multiple columns, I can highlight as many columns as I want and then select A to Z. But this doesn't seem to be the case for sorting rows. In terms of sorting rows, the only thing I can seem to do is to go into Data-->Sort-->Options-->Select Left to Right. I can then sort a single row, and from this window it looks like a may (although haven't figured out how to get it to work) three rows, but I cannot tell how I might be able to sort more than three rows. For instance, suppose I have the following data

3, 2, 1
6, 5, 4
98, 97, 96
33, 32, 21

I want to be able to select all of these rows and quickly sort them as follows:

1, 2, 3
4, 5, 6
96, 97, 98
21, 32, 33

i forget to mention at the same time! Not one by one!
let's say i have 200> rows so i would like to sort them form min to max but all together!
so...
THANKS IN ADVANCE
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Do a loop for all rows:
Code:
Sub Sortrows()
Dim i As Long
For i = 1 To [a65536].End(xlUp).Row
[a1].Offset(i - 1, 0).EntireRow.Sort Key1:=[a1].Offset(i - 1, 0), Order1:=xlAscending, Orientation:=xlLeftToRight
Next
End Sub
Best Regards
Northwolves
 
Upvote 0

Forum statistics

Threads
1,215,454
Messages
6,124,933
Members
449,195
Latest member
Stevenciu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top