VBA Macro to Send Mutliple Emails to Multiple Contacts with Slightly Different Subject and Body

ak_254

New Member
Joined
Jan 9, 2018
Messages
10
Hi all,

This may be a bit of a long shot but I am trying to create or put together a VBA Macro for package distributions that will send out multiple email notification emails at once to the approriate point of contact each with slightly different subject header based on their location and the body of the email based on what the package contains.

Example:

Data Table:

ContentCustomerPackage NumberQty
ApplesTom111
OrangesBob223
WatermelonJill335
ApplesTom447
StrawberryTom553

<tbody>
</tbody>


Ref Table:

CustomerNeighborhood
TomSerra Mesa
BobNorth Park
JillPacific Beach

<tbody>
</tbody>


In this case I want to be able to send out 1 unique email to each customer based on what the content of the package contains. In this case there will be a total of 4 emails being sent out at once.

Tom - Apples (Package 11/44) *Since Tom has 2 packages containing apples it will consolidate the info into 1 email*
Bob - Oranges (Package 22)
Jill - Watermelon (Package 33)
Tom - Strawberry (Package 55)


Example Email for Tom:

----------------------------------------------------------------------------------------------
To: Tom
Subject: Serra Mesa: Package Arrived containing Apples

Body:

Hi Tom,

Your package containing the following info has arrived

ContentCustomerPackage NumberQty
ApplesTom111
ApplesTom447

<tbody>
</tbody>

----------------------------------------------------------------------------------------------

Example Email for Jill:

To: Jill
Subject: Pacific Beach: Package Arrived containing Watermelon

Body:

Hi Jill,

Your package containing the following info has arrived

ContentCustomerPackage NumberQty
WatermelonJill335

<tbody>
</tbody>

----------------------------------------------------------------------------------------------

Please let me know if you have any questions to better explain the issue.

Any help or point in the right direction is greatly appreciated!
 

Some videos you may like

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Watch MrExcel Video

Forum statistics

Threads
1,109,431
Messages
5,528,734
Members
409,831
Latest member
KT50

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top