In need of horizontal sorting macro

  • Thread starter Thread starter bill_s1416
  • Start date Start date
B

bill_s1416

I need to horizontally sort a table. It's laid out as follow
left-to-right:

Row1: blank, product1, product2, product3, product1, (repeating)
Row2: Territory, Jan, Jan, Jan, Feb, (repeating)

I need to horizontally sort it such that the 12 product1 columns (Ja
--> Dec) are all together, product2 are all together, etc.

Can anyone help with a macro? :confused:

P.S. The complete data table's range is A1:AK51 comprised of 1 colum
of territory numbers and 36 columns of data (3 products x 12 months.
 
I need to horizontally sort a table. It's laid out as follows
left-to-right:

Row1: blank, product1, product2, product3, product1, (repeating)
Row2: Territory, Jan, Jan, Jan, Feb, (repeating)

I need to horizontally sort it such that the 12 product1 columns (Jan
--> Dec) are all together, product2 are all together, etc.

Can anyone help with a macro? :confused:

P.S. The complete data table's range is A1:AK51 comprised of 1 column
of territory numbers and 36 columns of data (3 products x 12 months.)

It may be version dependent, but Excel 2002 has sort left to right as an option
in the Data/Sort command. I do not believe that the horizontal sort allows for
"header" rows, so you should not select that row.


--ron
 
Back
Top