MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Sort Orders (advanced)

Posted by Daniel Cremin on December 16, 2001 1:42 PM

I have a list of students, entered using a dialog form,
that inserts each student row above a named range row.
I want the rows (C8:C38)- the maximum
no of students is 30,to be automatically re-sorted by
teacher name on entry (e.g. Mr Dickens) students first
and then mr Evans students, etc. The tricky bit is that
i want each of these lists to also be in alphabetic
order so that for example all students in Mr Dickens
class start at A and go down. Is this possible to
get to automatically occur. Thanks in advance

Posted by Gary on December 16, 2001 2:01 PM

Use the macro recorder and then sort the data using Excel's Sort command on the Data menu.

Tidy up the code the recorder produces then call it from right place (perhaps when someone presses OK on your userform) and there you go.