VBA: Automatically send email based on a Criteria

hoghog

New Member
Joined
Feb 19, 2016
Messages
9
hi, i am seeking help on how to automate below process and write a vba.

Case: i have an excel file whereby column K = date, column E, G = email address that i am going to send an email to. header is in row 2.
usually, i will filter to column K the month that i am working on, send an email to each customer base on the respective Column E, G cell for the email address.
in the email subject, will indicate "reminder - [customer]" -> customer will be the value found in column A
Email content:
line 1: hi,
line 2: this is line 2.
line 3: copy the table over with header row 2 and its respective row (without column I and J)

example: if i filter to Mar 2020, i will need to send 3 emails out.
the 1st email will be sent to E3, G3, subject: reminder - A3
hi, this is line 2, copy the table from range A2:L2 and A3:L3(without column I and J)

2nd email will look like this.
send to E6, G6, subject: reminder: A6
hi, this is line 2, copy the table from range A2:L2 and A6:L6 (without column I and J)

thanks in advance.
 

Attachments

  • Capture.PNG
    Capture.PNG
    28.9 KB · Views: 4

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,215,020
Messages
6,122,709
Members
449,093
Latest member
Mnur

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
Back
Top