+ Reply to Thread
Results 1 to 6 of 6

Auto send email when condition is met

  1. #1
    Forum Contributor
    Join Date
    02-23-2007
    Location
    England
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2208 Build 16.0.15601.20072) 64-bit
    Posts
    102

    Auto send email when condition is met

    Hello All
    I am hoping you can help me with the below.

    What I want
    I have an excel spreadsheet containing a list of tasks that need completing. I have coded the sheet with formula to automatically indicate when items require an update (example attached). What I am after is for an automatic email to be sent to me for each item listed as ‘Update Required’. The body needs to contain the brief description of the item, so for example the ‘Update Required’ indicator is in column F and the item description is in column B, so would require something like ‘ActiveCell.Offset(-4,0)’ to select and copy the description.

    What I have
    Below is my attempt at the code required but it isn’t working right. This is what I want:
    • Email to only be sent for items listed as ‘Update Required’ in column F
    • Email to still work even when the worksheet is not open
    • Email body to contain the brief description contained in column B

    Spreadsheet condition trigger

    Please Login or Register  to view this content.
    Email process
    Please Login or Register  to view this content.
    Appreciate this is a lot to ask but am grateful for any assistance I can receive

    Many thanks All
    G1
    Attached Files Attached Files

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Auto send email when condition is met

    Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and comment out this.
    Please Login or Register  to view this content.
    and change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Forum Contributor
    Join Date
    02-23-2007
    Location
    England
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2208 Build 16.0.15601.20072) 64-bit
    Posts
    102

    Re: Auto send email when condition is met

    Hello Tinbendr

    Thank you for your help with this. I really was stuck in a rut. I have changed my code as you had mentioned which now looks like the code below. Unfortunately I am encountering a few issues which I feel may take some variable additions to correct, and I have no idea where to start.

    Please Login or Register  to view this content.
    Issue are:

    When I amend the code to capture all instances of the word ‘Update Required’ from a range (Say if only 1 instance is triggered between range F14:F19), instead of sending just one email, I am getting 6. What I want is to receive just one email per instance, so if the date changed and suddenly three items got flagged as ‘Update Required’ then I only want those three emails generated; at the moment I would get 18 duplicates
    Is there a way to get the worksheet change value to trigger if the workbook is closed? Currently an email is only generated if I click on the cell with the word ‘Update Required’ in it. Ideally I want to be reminded of something even when I am not actively in the workbook (not sure if this is maybe a stretch too far for Excel
    I hope I am not being to expectant sir and I fully appreciate all of the advice you have already given.
    Thanks again Tinbendr

    G1

  4. #4
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Auto send email when condition is met

    at the moment I would get 18 duplicates
    This is why you shouldn't insist on an 'automatic' response.

    Honestly, a button on the sheet or a Ribbon tab is a far better option. And because you want to send all alerts collectively, this is the only reasonable way to run it.

    Ideally I want to be reminded of something even when I am not actively in the workbook (not sure if this is maybe a stretch too far for Excel
    Yes, I'm afraid it is, but you can push reminders out to Outlook.
    Last edited by Tinbendr; 02-08-2016 at 04:01 PM.

  5. #5
    Forum Contributor
    Join Date
    02-23-2007
    Location
    England
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2208 Build 16.0.15601.20072) 64-bit
    Posts
    102

    Re: Auto send email when condition is met

    Hello Tinbendr

    Thanks once again for your quick reply.

    Yes I guess when I think about it, if Excel was that versatile then there would be no need for half of these new web based systems being created. After all I should remember that Excel is not some multileveled database application that is capable of creating whatever the user can dream of.

    But I am grateful for what you have given me so far Tinbendr, and I will just have to work with what I have. It is still pretty amazing.

    Thanks again and take it easy
    G1

  6. #6
    Forum Contributor
    Join Date
    02-23-2007
    Location
    England
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2208 Build 16.0.15601.20072) 64-bit
    Posts
    102

    Re: Auto send email when condition is met

    Hello Tinbendr

    Thanks once again for your quick reply.

    Yes I guess when I think about it, if Excel was that versatile then there would be no need for half of these new web based systems being created. After all I should remember that Excel is not some multileveled database application that is capable of creating whatever the user can dream of.

    But I am grateful for what you have given me so far Tinbendr, and I will just have to work with what I have. It is still pretty amazing.

    Thanks again and take it easy
    G1

+ 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. Condition on sendint email or not to send email by a yes no in a cell
    By toofani in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2015, 04:35 AM
  3. VBA macro to send an email based on some condition.
    By santoshch in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2014, 11:30 PM
  4. [SOLVED] auto send email help
    By laduk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2013, 05:53 AM
  5. Auto send email with the cell value that triggered the email in the first place.
    By coobey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2013, 05:40 PM
  6. [SOLVED] Help please with auto send email VBA, it was working but isn't now
    By nje in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2013, 11:03 AM
  7. Excel to automatically send an email from Outlook when a condition is met
    By Spyke in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-14-2011, 04: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