VBA & Macro Problems

Send Automatic Outlook Reminder Emails from Excel Cell Values

Jason MillerJason Miller Nov 18, 2026 868 views

Question details

Send an Outlook reminder to the recipient in each worksheet row when its calculated deadline reaches 30 days.

Send Automatic Outlook Reminder Emails from Excel Cell Values
Product
Microsoft Excel and Microsoft Outlook
Device & OS
not provided
Scenario
A worksheet tracks tasks, recipient email addresses, and calculated days remaining until each deadline.
Observed behavior
Each eligible row should generate one reminder email, and a status flag should prevent repeat messages.
Before you start

This example requires desktop Excel with VBA and classic Outlook configured with a sending account; new Outlook does not support this VBA automation. Save the workbook as an Excel Macro-Enabled Workbook (.xlsm), and enable macros only if you trust the workbook.

Solution 1Recommended

Use Excel VBA to send and track Outlook reminders

Use this method to check calculated days remaining and send one reminder per eligible worksheet row.

The example checks for exactly 30 days remaining. Excel must be open and the workbook must recalculate on that day; it will not send reminders while the workbook is closed.

Outlook may display security prompts or delay delivery. The Sent flag indicates that the macro called Outlook's Send method, not that delivery was confirmed.

1
Arrange the worksheet

Name the worksheet Reminders. Put recipient email addresses in column A, task names in column B, calculated days remaining in column C, and reminder status in column D, with headers in row 1. For example, if the deadline date is in E2, enter =E2-TODAY() in C2 and fill the formula down.

2
Add the reminder macro

Press Alt+F11, choose Insert > Module, and paste this code: Option Explicit Public Sub SendDueReminders() Static running As Boolean Dim ws As Worksheet, olApp As Object, mail As Object Dim lastRow As Long, r As Long Dim oldEvents As Boolean If running Then Exit Sub running = True oldEvents = Application.EnableEvents On Error GoTo CleanUp Application.EnableEvents = False Set ws = ThisWorkbook.Worksheets("Reminders") lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row For r = 2 To lastRow If Not IsError(ws.Cells(r, "C").Value) Then If IsNumeric(ws.Cells(r, "C").Value) And Len(ws.Cells(r, "C").Value) > 0 Then If CDbl(ws.Cells(r, "C").Value) = 30 Then If Len(Trim$(ws.Cells(r, "A").Value)) > 0 And LCase$(Trim$(ws.Cells(r, "D").Value)) <> "sent" Then If olApp Is Nothing Then On Error Resume Next Set olApp = GetObject(, "Outlook.Application") If olApp Is Nothing Then Set olApp = CreateObject("Outlook.Application") On Error GoTo CleanUp If olApp Is Nothing Then Err.Raise vbObjectError + 1, , "Outlook could not be started." End If Set mail = olApp.CreateItem(0) With mail .To = ws.Cells(r, "A").Value .Subject = "Reminder: " & ws.Cells(r, "B").Value .Body = "Reminder: " & ws.Cells(r, "B").Value & " is due in 30 days." .Send End With ws.Cells(r, "D").Value = "Sent" End If End If End If End If Next r CleanUp: If Err.Number <> 0 Then MsgBox "Reminder macro stopped: " & Err.Description, vbExclamation Application.EnableEvents = oldEvents running = False End Sub

3
Run the macro when calculations change

In the VBA editor, double-click the Reminders worksheet under Microsoft Excel Objects and paste: Private Sub Worksheet_Calculate() SendDueReminders End Sub Then double-click ThisWorkbook and paste: Private Sub Workbook_Open() Worksheets("Reminders").Calculate SendDueReminders End Sub

4
Test and save the workbook

Save the workbook, then test with your own email address and a value of 30 in column C. Press Alt+F8, select SendDueReminders, and click Run. Check Outlook and confirm that column D says Sent. Reopen the workbook with macros enabled to test the automatic check.

Use Excel VBA to send and track Outlook reminders
Test before sending to recipients: The macro sends emails immediately. Use test addresses first. To preview messages instead, temporarily replace .Send with .Display and remove the line that writes Sent; restore both lines before using the macro for automatic sending.
Free Microsoft Office alternative

Manage deadline worksheets with WPS Spreadsheet

WPS Office is a free, lightweight alternative with a familiar interface for editing deadline trackers. It supports common Microsoft Office formats, making it easier to move existing files. It does not fix or replace the Excel-to-Outlook VBA automation described above.

Track tasks, recipients, and calculated deadlines in a spreadsheetOpen and edit Microsoft Excel formats such as XLSXWork with a familiar spreadsheet interfaceUse a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Will reminders send when the workbook is closed?

No. Excel must be running with the workbook open and macros enabled for the calculation event or manual macro to run.

What happens if I open the workbook after the deadline has passed the 30-day mark?

The example checks for exactly 30, so it will not send a missed reminder when the value is 29 or less. Adjust the condition in the VBA module if you want a different reminder window.

How do I send another reminder for a row?

Clear Sent from that row's column D, confirm that column C still meets the condition, and run SendDueReminders from Alt+F8 or recalculate the worksheet.

Why did the macro stop without sending every reminder?

Check the error message, verify the worksheet is named Reminders, and make sure classic Outlook is installed and configured. Rows already marked Sent remain flagged; after correcting the issue, run the macro again from Alt+F8.