Sorting drop-down list data by Day of the week and then time

mj_bowen

Board Regular
Joined
Oct 4, 2009
Messages
101
Hi,
I have some data from two drop-down lists that I would like to sort.
The data is in two columns
1: 'Day of the week'
and
2: 'Time'
I would like to be able to sort the drop-down data so that
it is in order of days then timeslots - eg, all the Mondays in time order, followed by all the Tuesdays in time order etc.
Is this possible?
I've tried using a filter but it puts Thursday before Tuesday and doesn't always get the other days in order either.
Not sure how to solve this?

Days .png


Any suggestions would be welcomed,
kind regards,
MJ

Here is a link to the sheet:
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Like this ?

with SpreadSheet
Excel Formula:
=LET(Data,A2:B14,Days,SWITCH(A2:A14,"Monday",1,"Tuesday",2,"Wednesday",3,"Thursday",4,"Friday",5,"Saturday",6,"Sunday",7),CHOOSECOLS(SORTN(HSTACK(Data,Days),13,1,3,TRUE,2,TRUE),1,2))

or Excel
Excel Formula:
=SORTBY(E5:F17,SWITCH(E5:E17,"Monday",1,"Tuesday",2,"Wednesday",3,"Thursday",4,"Friday",5,"Saturday",6,"Sunday",7),1,F5:F17,1)

1714614717382.png
 
Upvote 0
Hi SunnyAlv,

Thank you so much for sorting this - not sure how you did it but it works!
I have added some sample pupil names to one of the sheets as my ultimate aim is to be able to
sort pupil names dependent on their day and time slots chosen - I thought I would be able to adapt but it is way beyond me!
Is this extra layer of sorting possible?
kind regards,
MJ
 
Upvote 0
Hi SunnyAlv,

Thank you so much for sorting this - not sure how you did it but it works!
I have added some sample pupil names to one of the sheets as my ultimate aim is to be able to
sort pupil names dependent on their day and time slots chosen - I thought I would be able to adapt but it is way beyond me!
Is this extra layer of sorting possible?
kind regards,
MJ
hmm, maybe that's possible, you could attach a picture/table so I can help
 
Upvote 0

Forum statistics

Threads
1,216,038
Messages
6,128,443
Members
449,453
Latest member
jayeshw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top