Sort Formula on different categories

mayoub

New Member
Joined
Jun 17, 2014
Messages
20
Hi Guys,

I have the following sheet (the actual one includes 1000 line in it),
How can i use a sort formula to actually sort in a descending way for each category (i.e: Cars, Bikes...)

Thanks.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Item[/TD]
[TD]Sales[/TD]
[/TR]
[TR]
[TD]Cars[/TD]
[TD]42[/TD]
[/TR]
[TR]
[TD]BMW[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]Mercedes[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Renault[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]Citroen[/TD]
[TD]18[/TD]
[/TR]
[TR]
[TD]Bikes[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]BMW[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Suzuki[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]Ferrari[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Bicycles[/TD]
[TD]203[/TD]
[/TR]
[TR]
[TD]BMX[/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]Hites[/TD]
[TD]19[/TD]
[/TR]
[TR]
[TD]Jet[/TD]
[TD]125[/TD]
[/TR]
[TR]
[TD]Bondel[/TD]
[TD]36[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Put the categories in a separate column, then sort:

[Table="width:, class:grid"][tr][td="bgcolor:#C0C0C0"][/td][td="bgcolor:#C0C0C0"]
A​
[/td][td="bgcolor:#C0C0C0"]
B​
[/td][td="bgcolor:#C0C0C0"]
C​
[/td][/tr][tr][td="bgcolor:#C0C0C0"]
1​
[/td][td][/td][td="bgcolor:#F3F3F3"]
Item
[/td][td="bgcolor:#F3F3F3"]
Sales
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
2​
[/td][td]Bicycles[/td][td]BMX[/td][td]
23​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
3​
[/td][td]Bicycles[/td][td]Bondel[/td][td]
36​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
4​
[/td][td]Bicycles[/td][td]Hites[/td][td]
19​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
5​
[/td][td]Bicycles[/td][td]Jet[/td][td]
125​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
6​
[/td][td]Bikes[/td][td]BMW[/td][td]
7​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
7​
[/td][td]Bikes[/td][td]Ferrari[/td][td]
2​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
8​
[/td][td]Bikes[/td][td]Suzuki[/td][td]
15​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
9​
[/td][td]Cars[/td][td]BMW[/td][td]
12​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
10​
[/td][td]Cars[/td][td]Citroen[/td][td]
18​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
11​
[/td][td]Cars[/td][td]Mercedes[/td][td]
3​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
12​
[/td][td]Cars[/td][td]Renault[/td][td]
9​
[/td][/tr]
[/table]
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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