Sorting Data By Day Of The Week
If you want sort by the day of the week, then you need to return the day of the week for each date and then sort the results to group the days of the week. Okay, suggest these instructions:
- Use the function: Weekday(DATE)
to return the integer value of the day of the week.
- Then apply a custom format to the results by selecting the column or range; choosing Format, Cells; clicking the Number tab; choosing Custom from the Category control; entering
in the Type control; and then clicking OK. The Weekday() functions should then display the abbreviated name of each day of the week.
- Now to sort the results: simply select the range you want to sort, making sure the Weekday() column is the active column, and then click Sort Ascending or Sort Descending. Excel will sort the values by the day of the week, not by the actual dates.
Tip initially comes from Susan Sales Harkins, a private consultant specializing in Access and VBA development. She currently has two technical books on the shelves: "Using Microsoft Access 97" and "Using Microsoft Access 2000." Both are QUE publications.
Just click on the button for the Tiproom's Home Page.
Date of last revision: 21 August 2001.