HOW TO SORT 4 COLUMNS

D

damorrison

select data sort and pick the rows you want to sort by,
If you want it in VBA then use your macro recorder, but before you
record the macro practice on it first, there is nothing more maddenning
than having to record he macro 5 or 6 times because of forgetting
something.
then from the forms button select a command button and assign a macro
to it
 
V

Victor Costello

I HAVE A CUSTOMER LIST THAT I NEED TO SORT IN THIS ORDER, ST (COLUMN G),
CITY (F), ZIP (H) & NAME (A). RANGE IS A6:M565.

THANKS.
VICTOR
 
V

Victor Costello

I should explain that I need to sort the criteria in those column and it
only allows three. Consequently, in the range I specified, I need to perform
a sort where it is done by State, then by City, then by Zip, then by Name.

Thanks, victor
 
R

Ragdyer

You can sort on as many keys as you wish.

The only restraint that XL puts on you is how many you can do at one time,
which means that you'll have to sort more then once.

Just remember to work backwards, sorting the last keys first.

In your case, sort first by name, then start another, using the remaining 3.
 
D

damorrison

sort three the first time and then the fourth time the second time has
been noted
 
V

Victor Costello

Sort which three the first time? Fourth time?? Please explain.

I have tried the double sort in various configurations, but on the second
sort, it overides the previous sort. What am I doing wrong?

Thanks,
Victor
 
D

damorrison

Click a cell in the range you want to sort.
On the Data menu, click Sort.
In the first Sort by box click the column of least importance.
Click OK.
On the Data menu, click Sort.
In the Sort by and Then by boxes, click the other three columns you
want to sort, starting with the most important.
Select any other sort options you want, and then click OK.
 
V

Victor Costello

Thanks for taking the time to explain. It worked great.

Best regards,
victor
 
Top