PDA

View Full Version : Sorting multiple rows in descending order with their respective columns



mscs
03-19-2012, 04:13 AM
Hi,
I am facing trouble in sorting.
I want to sort each row with respect to each column label through MACRO.
For Example: Top row heading is "shopk's" and there are four other columns in row 1 like TV, Refrigerator, VCD and Microwave.

Shopk's TV Refrigerator VCD Microwave
Shopk1 4200 4500 4300 4450
Shopk2 4400 4200 4100 4350

Now I want to sort each row in descending order with respective column label (heading). "Shopk1" data should be sorted like this

Shopk's Refrigerator Microwave VCD TV
Shopk1 4500 4450 4300 4200


and the data of "Shopk2" should be sorted like

Shopk's TV Microwave Refrigerator VCD
Shopk2 4400 4350 4200 4100

I am very confused, Please help me to solve this problem through macro.

Best Regards,

parttime_guy
03-22-2012, 11:31 PM
Hi mscs,

Read ur sorting problem - me too confused got... :) :bug:

But... took me about some time to figure this one out

See attachment.

Hope this solves ur query

Regards :hi:

Dianiysom
03-23-2012, 12:07 AM
I also have that confusion

parttime_guy
03-23-2012, 07:14 PM
Sorry Guz, there is a bug in the file above :banghead: (u can view it and test it, don't use it) - my mistake.
Still trying to sort the problem out.
I believe, we need to involve the Gurus of vbaexpress.com

parttime_guy
03-30-2012, 08:53 PM
Check the attachment below
Hope this file works for you

Regards