+ Reply to Thread
Results 1 to 6 of 6

Trying to send auto. emails based on different criteria

  1. #1
    Registered User
    Join Date
    01-20-2021
    Location
    Virginia
    MS-Off Ver
    Office Home and Business 2016
    Posts
    6

    Unhappy Trying to send auto. emails based on different criteria

    I am needing to send automatic emails based on due dates when they become past due. Each row has it's own due date and it's own person & email address assigned to it. I am looking to have each row send an email when each due date is past due to each specific person assigned to that task. I have attached a copy of the spreadsheet I am currently working on. I am extremely new to Macros, but have the basics down of how they work. This is the current one I am using:

    Please Login or Register  to view this content.
    Here are the rules I am looking for:
    1. When any row in Column "B" has a past due date, I want an email to send to the corresponding person in Column E on THE SAME ROW. Example: If B5 is past due, I want an email to send ONLY to the person in E5. If B10 is past due, I want an email to send ONLY to the person in E10.
    2. When the email is created, I want the body to pull A1 as well as the information from column C in the corresponding row. Example: If B5 is past due, I want the email to send to the email address listed in E10 with the body of the email containing A1 and C10.

    I may not even be using the correct Macro above. Any recommendations will be gratefully appreciated!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Trying to send auto. emails based on different criteria

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new, I have done it fir you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Trying to send auto. emails based on different criteria

    Thanks for using the code tags. Try this code. It does what you asked for. It also adds a date to column I denoting when the email was sent, and the code checks that column so that a second email is not sent for the same task. If the cell is blank then the email will be triggered. I am guessing you might want this functionality, but it can be removed if you like.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by maniacb; 01-20-2021 at 08:10 PM.

  4. #4
    Registered User
    Join Date
    01-20-2021
    Location
    Virginia
    MS-Off Ver
    Office Home and Business 2016
    Posts
    6

    Re: Trying to send auto. emails based on different criteria

    I apologize. I am new to this! Thank you for the fix and I will guarantee any future ones will have the correct criteria!

  5. #5
    Registered User
    Join Date
    01-20-2021
    Location
    Virginia
    MS-Off Ver
    Office Home and Business 2016
    Posts
    6

    Re: Trying to send auto. emails based on different criteria

    That worked! Thank you SO MUCH! Question for you, I am creating multiple tabs copied off the same sheet that have all of the same applied rules. Will that Module overlook the entire workbook? Or will I need to run the Sub individually on every worksheet?

  6. #6
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Trying to send auto. emails based on different criteria

    For this process to work on a different tab, copy the code in the sheet module into the new tabs sheet module

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Send Multiple Emails and Attachments Based on Criteria
    By ShakJames in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-18-2018, 09:44 AM
  2. Excel vba to auto-send customer emails (duplicate emails issue)
    By nadz84 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-29-2015, 10:08 AM
  3. Need to auto send one of three emails based on three conditions
    By BOD117 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2015, 02:52 PM
  4. Send Emails once expiry date is reached, and generate report based on emails sent
    By demonicscorpion in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2014, 05:36 AM
  5. Create Macro - VBA to send mutiple emails based on a criteria
    By hervaz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2012, 02:41 PM
  6. Auto Send Emails Based on Due Date
    By Nuclearman83 in forum Excel General
    Replies: 5
    Last Post: 03-23-2012, 02:54 PM
  7. Send Mail Merge Auto-Emails based on date
    By Phillycheese5 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2005, 11:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1