Sorting Data Grid - Row, then Column (Alphabetically)

Blackmarxz

New Member
Joined
Oct 6, 2014
Messages
1
Hello

I have a grid of data that I'm looking to do a two-step sorting process on

1 Sort each row alphabetically

2 Sort each column Alphabetically


For illustration - original data grid (reads horizontally) could look like below:



1
2
3
4
5
6
Orange
Apple
Pear
Blueberry
Apple
Kiwifruit
Lime
Banana
Blackberry
Kiwifruit
Orange
Pear
Lime
Melon
Starfruit
Durian
Jackfruit
Watermelon
Pear
Apple

<tbody>
</tbody>


After being sorted should look like :


1
2
3
4
5
6
Apple
Blueberry
Orange
Pear
Apple
Durian
Jackfruit
Pear
Watermelon
Apple
Kiwifruit
Banana
Blackberry
Lime
Kiwifruit
Lime
Melon
Orange
Pear
Starfruit

<tbody>
</tbody>


Firstly each row was sorted horizontally. Then each column vertically - keeping each row's data intact

Rows will have different number of data points

Would prefer to do it via formulas if possible.

Numbers at top are column headers

Data set could grow to a couple thousand rows. Columns perhaps up to 30

If you can find a way to automate this it would be much appreciated. Can do it manually - but is fiddly and painful with alot of data.

Cheers
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,221,517
Messages
6,160,276
Members
451,635
Latest member
nithchun

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