+ Reply to Thread
Results 1 to 22 of 22

Macro to send email upon certain date trigger

  1. #1
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Macro to send email upon certain date trigger

    Hi guys,

    I think this is super complicated and i can't get it to work even a little bit...

    i need excel to, upon opening a workbook, send an email if a condition is met, that condition being a date in a cell passing ONLY if adjacent cell is blank.

    for example, in column A we have a list of dates, and if the date in A2 passes and B2 is blank, i need it to trigger an email sent to one fixed recipient, preferably with the title of the workbook within the body or title of the email.

    Can someone help me?

    If any more information is needed please ask!

    EDIT* thinking about it, this doesn't seem like a macro is needed, perhaps an active function type thing? (forgive the lack of technical jargon)
    Last edited by fabrecass; 01-11-2013 at 12:17 PM.

  2. #2
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: Macro to send email upon certain date trigger

    bump

    no one?

  3. #3
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: Macro to send email upon certain date trigger

    guys?! is this crazy complicated or do i smell?

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Macro to send email upon certain date trigger

    hi, try the attachement and see if it heps you!
    http://www.excelforum.com/excel-gene...coming-up.html
    Attached Files Attached Files
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  5. #5
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: Macro to send email upon certain date trigger

    Hi John,

    thanks for the reply, and yes, it does help, is there any way to make it so that the event occurs as you open the workbook? - and i need the email to send automatically? can this be done?

  6. #6
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Macro to send email upon certain date trigger

    yeap, copy the whole code and paste it in Thisworkbook (have a look in the left side and click on Thisworkbook and then in the right side select Workbook
    something like this...
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: Macro to send email upon certain date trigger

    Thanks for this John.

    It's perfect, apart from the fact the email doesn't automatically send?

  8. #8
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Macro to send email upon certain date trigger

    replace
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: Macro to send email upon certain date trigger

    this works perfectly on the workbook you sent John, i just can't get it to work in my workbook! all i'm changing is the fact i'm using column's L and M instead of A and B...

    so i amended
    HTML Code: 
    to
    HTML Code: 
    column M is blank yet it's not working? conditional fomatting in column M wouldn't affect it would it?

  10. #10
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Macro to send email upon certain date trigger

    have a look at code and replace what is reffering to column A B,C
    here 1 is for col A, 2 is for col B
    Please Login or Register  to view this content.
    here 3 is for col C (please ignor the text in red)
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: Macro to send email upon certain date trigger

    hi john,

    i've replaced 1, with 12 (for col L), 2 with 13 and i've put the email address in column N (for which i've used 14)

    still no luck.

    HTML Code: 

  12. #12
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Macro to send email upon certain date trigger

    and this one for yr date, I mean L as you said...
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: Macro to send email upon certain date trigger

    yes, i've changed this one as well and still not working !!

    i wish i could upload the workbook but work restrictions won't let me!!!

  14. #14
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Macro to send email upon certain date trigger

    k, I try it but tell me what are your columns used, for date, for empty cell, for email address!
    edit:
    hope these are yr colums
    Please Login or Register  to view this content.
    Last edited by john55; 01-14-2013 at 08:54 AM.

  15. #15
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: Macro to send email upon certain date trigger

    I've got it working John! Thank you so much! however, i don't think i set out my requirements fully - even if the whole column is blank, i only want 1 email sent, currently because the whole column of M is blank it tries to send an email for each row.

    does this make sense?

  16. #16
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Macro to send email upon certain date trigger

    if your column M is blank then
    Please Login or Register  to view this content.

  17. #17
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: Macro to send email upon certain date trigger

    it keeps sending 1 email for each row, i only want 1 email sent total - not per row.

  18. #18
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Macro to send email upon certain date trigger

    try this, C2 is yr cell having the email address
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.

  19. #19
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: Macro to send email upon certain date trigger

    not working i'm afraid, won't stop sending emails...

    Please Login or Register  to view this content.

  20. #20
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Macro to send email upon certain date trigger

    I am sorry, maybe someone else can help you!

  21. #21
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: Macro to send email upon certain date trigger

    thanks for trying John!

    can anyone else help?! If M2 is blank and the date in L2 has passed, i need to send an email.

  22. #22
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Macro to send email upon certain date trigger

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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