Automatic sorting

New Contributor

Hello. I have an Excel worksheet that I use to track projects. In an ideal world, I would like the data to automatically sort based on two columns (due date and status). As I change the status from Pending to Complete, I would like it to sort z-->a, the completed items move to the bottom of the list. I would also like sorting by due date so the pending items with shortest timeframe are on top.


I use MS Office 365, and I can't figure it out. Is it even possible? If so, how do I set it up? 


2 Replies

Hello @David_Cox1201 ,


How automatic do you need this to be? If your data is in an Excel Table, then you can sort by the table headers. Everything else will require programming.


If you need this to happen automatically, then you can start the macro recorder, then sort the data, then stop the macro recorder. After that you can configure Excel to run the macro whenever the data changes. This can be done with a Worksheet_Change event.

@Ingeborg Hawighorst Thank you! I've recorded the macro. I'm a novice here, so pardon my ignorance...but I can't figure out how to configure Excel to run it when the data changes. I clicked the link, but where do I set up the Worksheet Change Event?