You are here:

Excel/Send e-mail based on a cell value with a customized body


Hi Jerry,

Good Day to you.

I have excel 2007.

I want to send an e-mail from Excel as per the following conditions:

- E-mail subject & body texts will be variables based on cells B2, 3 values.

- To & CC fields will be filled with the values in cells C2&3.

- E-mail body will contain on 4 variable fields in addition to the text (Name, Date, Position, Rating), based on the cells values respectively E3, 4, 5, 6.

- The e-mail will be sent from the active sheet.

I'm attaching you an image to explain the requirements.

Sorry for my long e-mail.

Microsoft's own tutorials on the SENDMAIL method is a great starting point.

In that example codes, you see the .TO  field hardcoded with a string, you can replace that string with a cell reference instead:

   With OutMail
       .To = Range("C2").Value
       .CC = Range("C3").Value

You'll get the idea.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Jerry Beaucaire


Excel Formulas, macros, automation. Microsoft Excel MVP - 2010. Code site with free code snippets and techniques:


Microsoft Excel MVP - 2010. I have my own extensive Excel help/code site: ===================== I have been offering free assistance as an Excel aid on many web sites for many years: ( - JBeaucaire) ======== ( - JBeaucaire) ======= ( - jbeaucaire)

Bachelor's Degree from Azusa Pacific University in Mathematics and Music Composition

Awards and Honors
Microsoft Excel MVP 2010

©2016 All rights reserved.