

And specify the Cc and Bcc recipients as you need in. Replace the Email Address with the recipient email address in line. Please change the email body as you need in xMailBody line in the code.ģ. In the VBA code, D7 and value > 200 are the cell and cell value you will send email based on.Ģ. XMailBody = "Hi there" & vbNewLine & vbNewLine & _ġ.

Set xOutApp = CreateObject("Outlook.Application")

If IsNumeric(Target.Value) And Target.Value > 200 Then Private Sub Worksheet_Change(ByVal Target As Range) VBA code: Send email through Outlook based on cell value in Excel Dim xRg As Range In the popping up Microsoft Visual Basic for Applications window, please copy and paste the below VBA code into the sheet code window. In the worksheet you need to send email based on its cell value (here says the cell D7), right-click the sheet tab, and select View Code from the context menu. Please do as follows to send an email based on cell value in Excel.ġ. This article introduces a VBA method for you to quickly solve this issue.Īutomatically send email based on cell value with VBA code For example, when the value of cell D7 in a worksheet is greater than 200, then an email is created automatically. Supposing you want to send an email through Outlook to a certain recipient based on a specified cell value in Excel.
CHANGE DEFAULT EMAIL APPLICATION MAC FOR SENDING EXCEL FILES HOW TO
How to automatically send email based on cell value in Excel?
