How to Automatically Sort Excel Due Dates and Send Email Reminders
Question details
The user wants to automatically sort records by their due dates and trigger email notifications for tasks that are overdue or nearing their deadline.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Managing task deadlines and ensuring timely follow-ups without having to manually check dates every day.
- Observed behavior
- Looking for automated solutions to sort data and send reminders based on date conditions, rather than relying on manual filtering and emailing.
Ensure your worksheet contains a clearly formatted 'Due Date' column and that your dates are recognized by Excel as valid date values rather than plain text.
Use a VBA Macro to Sort Due Dates and Draft Emails
Ideal for users who actively review the workbook daily and want a one-click solution to filter deadlines and notify team members.
VBA macros require the Excel application to be open and running. This method is highly effective if you prefer to trigger the sorting and emailing process manually while you are working inside the spreadsheet.
Press ALT + F11 on your keyboard to launch the Microsoft Visual Basic for Applications window.
Click 'Insert' from the top menu and select 'Module'. This creates a blank space to paste or write your macro code.
Write a VBA script that selects your data range, sorts the 'Due Date' column in ascending order, and loops through the rows. Use an 'If' statement to check if the date is less than or equal to TODAY().
Within your loop, utilize the 'Outlook.Application' object to generate and display or send an email for rows that meet your overdue criteria.
Automate Daily Reminders with Office Scripts and Power Automate
The most robust method for sending automated emails entirely in the background without needing to keep the Excel file open.
Manage Deadlines and Run VBA Macros Easily with WPS Office
While complex background cloud automations require specific Microsoft 365 subscriptions, you can efficiently manage due dates, run powerful VBA macros, and handle your daily spreadsheet tasks using WPS Office. It provides robust compatibility with Excel formats and VBA syntax without the heavy subscription costs.
- 1. Download and Install: Visit the official WPS Office website to download and install the free software on your device.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheet and open your existing .xlsx or .xlsm file containing your due dates.
- 3. Run Your Macros: Access the Developer tools in WPS to run your VBA macros for sorting dates and drafting emails exactly as you would in Microsoft Excel.

Frequently Asked Questions
Can a VBA macro run automatically without opening the Excel file?
No, VBA macros require the Excel application to be open and actively running to execute the code. For fully background operations, you must use cloud-based tools like Power Automate.
How do I calculate the remaining days until a due date using a formula?
You can use a simple formula like '=A2-TODAY()', assuming A2 is the cell containing your due date. Format the resulting cell as a 'General' number to see the exact amount of days remaining.
Why aren't my due dates sorting correctly?
Excel might be reading your dates as text strings instead of actual date values. To fix this, highlight the column, go to the 'Data' tab, and click 'Text to Columns', then simply click 'Finish' to convert them into readable dates.
Can I send an email directly from Excel using VBA?
Yes, you can write a VBA script that interacts with desktop email clients like Microsoft Outlook. The script can be coded to automatically draft, attach files, and send emails based on the conditions met in your spreadsheet cells.





