How to sort a column by size

Closed
Jarod - Aug 4, 2010 at 11:30 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Aug 5, 2010 at 07:31 AM
Hello,

Hi, I get an excel file every week with varying amount of records and i have to rearrange it so all the records are sorted into tshirt size then color:

eg.

Rec Name Size Color
1 John S Blue
2 Jill L Red
3 Jack M Green
4 Jono XL Blue
5 Jan X Red
6 Juan S Green

I need the data to be sorted so the sizes go from s,m,l,xl,xxl then the colours..

How would I write a macro in excel for this?

thankyou!




Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Aug 5, 2010 at 07:31 AM
Directly is not possible becaue letters will not be sorted in the manner you want. you wound need to translate the "s", "xl" etc into numbers that goes in the order that are sortable and same for color
0