VBA email from outlook - Excel pivot

Miratshah

Board Regular
Joined
Nov 29, 2016
Messages
57
Hi,

I went through http://www.rondebruin.nl/sendmail.htm however it did not help since I am not much familiar with writing VBA code.

Can anyone help me with VBA to send email based on values in Excel pivot? I have embedded a sample excel file below:-

I need separate email where column A value changes which should have body of email from column B to G. Emails in To and CC can be picked up from column H and I respectively. Rest of the body like "Hi, please find below details" can be static for all emails.

ABCDEFGHI
1JoinPartyAffiliatePartyCodeInvoice DateInvoice No.TotalToCC
2IN1000AU1000IN1000AU1000Hello09/01/2019856166785 -2,10,696123@gmail.com,456@gmail.com789@gmail.com
3IN1000AU1000IN1000AU1000Hello Total -2,10,696123@gmail.com,456@gmail.com789@gmail.com
4IN1000AU2000IN1000AU2000Hello09/01/2019856166786 -7,37,437123@gmail.com,456@gmail.com789@gmail.com
5IN1000AU2000IN1000AU2000Hello Total -7,37,437123@gmail.com,456@gmail.com789@gmail.com
6IN1000CH1000IN1000CH1000Hello18/01/2019856166913 -1,07,928123@gmail.com,456@gmail.com789@gmail.com
7IN1000CH1000IN1000CH1000Hello Total -1,07,928123@gmail.com,456@gmail.com789@gmail.com
8IN1000GB1000IN1000GB1000Hello22/01/2019856166937 -4,32,250123@gmail.com,456@gmail.com789@gmail.com
9IN1000GB1000IN1000GB1000Hello19/02/2019856167320 -1,64,273123@gmail.com,456@gmail.com789@gmail.com
10IN1000GB1000IN1000GB1000Hello Total -5,96,522123@gmail.com,456@gmail.com789@gmail.com

<tbody>
</tbody>
Sheet1


<tbody>
</tbody>
 
Last edited:

Some videos you may like

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Watch MrExcel Video

Forum statistics

Threads
1,123,385
Messages
5,601,328
Members
414,444
Latest member
lionking15

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top