how can i change the default sort order in excel?

G

Guest

I have some data I am pulling from a system that records days of the week as
M, T, W, H, F, S, and U (Monday, Tuesday . . . . Sunday). I need to sort the
list so that it is in the order that the week follows (above) as opposed to
alphabetical (the result I get when I use the sort feature). I'm pretty
comfortable with everything in Excel except for VB which I fear holds my
solution. Does anyone out there have an idea??
 
M

Myrna Larson

I assume your column contains one of the codes you list. You can set up a
custom sort order. Check it out in Help. Then you have to use Data/Sort and
specify the custom order for this column (which must also be the 1st key).
 
G

Guest

Thank you! That worked like a charm!

Myrna Larson said:
I assume your column contains one of the codes you list. You can set up a
custom sort order. Check it out in Help. Then you have to use Data/Sort and
specify the custom order for this column (which must also be the 1st key).
 
M

Myrna Larson

BTW, if you have the actual date in one of the columns (rather than just the
single letter code you show), you can set up a "helper" column containing the
formula =WEEKDAY(A1,2) or =WEEKDAY(A1,3). That will return the numbers 1-7 or
0-6, respectively. Then you can sort on this column.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top