VBA & Macro Problems

Send an Automatic Email When Data Is Entered in Excel

Anum MushtaqAnum Mushtaq Nov 18, 2026 869 views

Question details

Send an email notification when someone enters text in a worksheet column starting at row 3, including entries in new rows.

Send an Automatic Email When Data Is Entered in Excel
Product
Microsoft Excel and classic Microsoft Outlook
Device & OS
not provided
Scenario
A worksheet needs an automatic notification whenever text is entered in a monitored column.
Observed behavior
Text entries from row 3 onward should trigger an email, while blank cells should not.
Before you start

Confirm that your organization permits automated email and that desktop Excel and classic Outlook for Windows are configured with an email account. Choose the column and recipient to monitor, and save the workbook as an Excel Macro-Enabled Workbook (.xlsm).

Solution 1Recommended

Use an Excel Worksheet_Change macro to send Outlook notifications

Use this method when the workbook is open in desktop Excel and classic Outlook for Windows is available.

The example monitors column A from row 3 to the bottom of the worksheet. It sends one email for each changed cell containing text, including cells filled by a paste. It does not detect changes caused only by formula recalculation.

1
Open the worksheet's code window

In desktop Excel, press Alt+F11. In the Project Explorer, double-click the worksheet you want to monitor under Microsoft Excel Objects.

2
Add the change event

Paste this code into the worksheet's code window: Private Sub Worksheet_Change(ByVal Target As Range) Dim changedCells As Range Dim cell As Range Dim outlookApp As Object Dim message As Object On Error GoTo SendError Set changedCells = Intersect(Target, Me.Range("A3:A" & Me.Rows.Count)) If changedCells Is Nothing Then Exit Sub For Each cell In changedCells.Cells If VarType(cell.Value2) = vbString Then If Len(Trim$(cell.Value2)) > 0 Then If outlookApp Is Nothing Then Set outlookApp = CreateObject("Outlook.Application") Set message = outlookApp.CreateItem(0) With message .To = "recipient@example.com" .Subject = "Worksheet data entered" .Body = "Text was entered in " & Me.Name & "!" & cell.Address(False, False) & ": " & cell.Value2 .Send End With End If End If Next cell Exit Sub SendError: MsgBox "An email could not be sent: " & Err.Description, vbExclamation End Sub

3
Set the column and recipient

Replace recipient@example.com in the .To line with the approved address. To monitor another column, replace both A references in the range expression with that column letter.

4
Save and test the notification

Save the .xlsm workbook, enable macros only if you trust it, and enter test text in cell A3 or a later cell in column A. Check the recipient's inbox and Outlook's Outbox or Sent Items.

Use an Excel Worksheet_Change macro to send Outlook notifications
Sending conditions: The macro runs only while the workbook is open in desktop Excel with macros enabled. Outlook or organizational security policies may prompt for permission or block automated sending. The message includes the entered text, so use an approved recipient and avoid sharing sensitive data without authorization.
Free Microsoft Office alternative

Manage Excel workbooks with WPS Spreadsheet

WPS Office is a free, lightweight Office alternative with a familiar interface. Open compatible Excel files and migrate everyday spreadsheet work with ease; the Outlook automation in this article remains a Microsoft Excel solution.

Review and edit worksheet data in a familiar spreadsheet interfaceCompatible with Microsoft Excel formats, including XLSX and XLSFree, lightweight office suite for everyday document work
microsoft office alternative - wps office

Frequently Asked Questions

Will the macro monitor rows added later?

Yes. The range expression covers column A from row 3 to the bottom of the worksheet, so entries in later rows are included.

Does the notification work when the workbook is closed?

No. Worksheet_Change runs when an edit occurs while the workbook is open in desktop Excel with macros enabled. A separate approved cloud workflow is needed for unattended monitoring.

What happens if I paste text into several cells at once?

The macro checks each changed cell in the monitored range and sends a separate email for each cell containing nonblank text.

Why didn't an email arrive after I entered data?

Check that the entry is text in the monitored column at row 3 or below, macros are enabled, and the recipient address is correct. Also check classic Outlook's Outbox and any organizational restrictions on automated sending.