+ Reply to Thread
Results 1 to 12 of 12

Send Email When Conditions Cell is True

  1. #1
    Forum Contributor
    Join Date
    07-22-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    133

    Send Email When Conditions Cell is True

    Hello All


    We have a sheet pulling data from different sources every 1 min and "Signal" cells that show "1" when the required conditions are met.

    Like this:
    lgJa3Vu.png

    We just want to send an email to the specific row address with its subject and body.

    How do we do it?

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Send Email When Conditions Cell is True

    This one was sort of a "slam dunk" as they say in American basketball. I have a subroutine already written for this kind of thing.

    On sheet 1 comment out the msgbox (I put it there for testing) and uncomment in the Mail_Workbook line.
    Please Login or Register  to view this content.
    Also if your table name is other than Table1, change the code to reflect that too.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    07-22-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Send Email When Conditions Cell is True

    Thank you dflak very much for stepping in.

    Having problems to open your file for some reason (Not the disk space or memory, as it has plenty. Also, I'm using only this file.):
    Yme2uO0.png


    I'll try your code and get back.
    Last edited by nicoan; 05-21-2018 at 02:55 PM.

  4. #4
    Forum Contributor
    Join Date
    07-22-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Send Email When Conditions Cell is True

    I'm probably doing something wrong.
    I got the msg popup working, but when I change the commenting I get this:

    6vNuqUJ.png


    Any idea? (I'm a VBA noob)

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Send Email When Conditions Cell is True

    Somehow I got a typo in the code

    In the module ModMailer, change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-22-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Send Email When Conditions Cell is True

    Ahh, there were more code in a module?
    The problem is that I cannot read the file.

  7. #7
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Send Email When Conditions Cell is True

    Just to be safe, I'll post it again. What are you seeing that you cannot read the file?
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    07-22-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Send Email When Conditions Cell is True

    Nope, see post #3. Tried everything. I'm getting the same message with the new upload.

    Very strange. Maybe you can just paste the complete code here.

  9. #9
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Send Email When Conditions Cell is True

    The code on sheet 1 is:
    Please Login or Register  to view this content.
    The code in the ModMailer Module is
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    07-22-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Send Email When Conditions Cell is True

    Very cool! Worked like a charm.. Thanks a million.

    So it seems to be using Outlook to send it, but Outlook doesn't need to be open.
    Other thing I noted is that it is using the Outlook default email address to send the email.


    Quick question: is there a way to control the sender address (not using the default one)?

  11. #11
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Send Email When Conditions Cell is True

    Right now it's looking up the sender address from the table. What do you have in mind? Do you want a pop-up input box? Or you could set up a table that essentially says, "When you see this email, use this one instead."

  12. #12
    Forum Contributor
    Join Date
    07-22-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Send Email When Conditions Cell is True

    NM thanks!
    Last edited by nicoan; 05-21-2018 at 10:40 PM.

+ 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. [SOLVED] Send email if a condition is true.
    By sn152 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-03-2022, 04:34 PM
  2. Send an ALERT email to a GMAIL address if conditions are met in a specific cell
    By zeegerman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-25-2015, 04:56 PM
  3. [SOLVED] Send email with cell info if true
    By Shallak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-24-2014, 02:04 PM
  4. Workflow with signatures (if cell=x then send email, if signed then send email)
    By Kate2811 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2014, 05:37 AM
  5. Send email to recipitent address which is in a cell, if cell CHANGES to true
    By shiftyspina in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2014, 01:05 PM
  6. Send Email Based on Multiple Conditions
    By scubab in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-20-2013, 12:25 PM
  7. send email message based on cell conditions
    By danusko in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2009, 02:24 PM

Tags for this Thread

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