+ Reply to Thread
Results 1 to 15 of 15

send e-mail from excell when cell value is...

  1. #1
    Registered User
    Join Date
    08-02-2020
    Location
    Israel
    MS-Off Ver
    2016-2013
    Posts
    13

    send e-mail from excell when cell value is...

    Hi!
    I have a file with a list of documents and a validation date. In a cell I have TODAY (), in one column I calculate how many days are between Today ans validation date.
    What I need is a vba, that check if the days difference is <30, send e-mail automatically .
    This VBA must run any time the file opens.
    Can you help me?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    42,129

    Re: send e-mail from excell when cell value is...

    Welcome to the forum.

    Your version of Excel (Office) is not W10 - please update your profile so that we know which flavour of Excel that you are using. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    5,883

    Re: send e-mail from excell when cell value is...

    .
    This is one method :

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    932

    Re: send e-mail from excell when cell value is...

    Here is another option with multiple solutions: I solved a similar request with the info below. see link for reference. If you have any questions let me know.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by maniacb; 08-02-2020 at 03:01 PM. Reason: Corrections to response

  5. #5
    Registered User
    Join Date
    08-02-2020
    Location
    Israel
    MS-Off Ver
    2016-2013
    Posts
    13

    Re: send e-mail from excell when cell value is...

    Thank you!
    I copy and try to use it but its doesn't work. It is not running. I attach my file...
    you are right I work in office 2016 or 2013
    I will appreciate if you can help me.
    The file is in Hebrew but you will understand the file

    Carina
    Attached Files Attached Files

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    5,883

    Re: send e-mail from excell when cell value is...

    .
    Your macro is looking at Column I which has formulas. The formulas are referring to a Sheet named _xlfn.DAYS which does not exist.

    Please Login or Register  to view this content.
    If you change the code to refer to Column H, the macros will work.

  7. #7
    Registered User
    Join Date
    08-02-2020
    Location
    Israel
    MS-Off Ver
    2016-2013
    Posts
    13

    Re: send e-mail from excell when cell value is...

    Thank you! i'll try this

  8. #8
    Registered User
    Join Date
    08-02-2020
    Location
    Israel
    MS-Off Ver
    2016-2013
    Posts
    13

    Re: send e-mail from excell when cell value is...

    Hi!!

    Thank you for all your help!!
    Now its working, how I can define to check a column , for example column H, instead a single cell?

  9. #9
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    5,883

    Re: send e-mail from excell when cell value is...

    .
    Here is code from a different project:

    Please Login or Register  to view this content.
    You will need to edit some of the code to fit your specific needs.
    Attached Files Attached Files

  10. #10
    Valued Forum Contributor
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    932

    Re: send e-mail from excell when cell value is...

    Carina, I took the liberty of changing @Logit's already working code and ran the date check across all items in the column H. I also added a value from the table into the subj of the email so you can see how to add table values for any given row. I hope this helps.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by maniacb; 08-07-2020 at 09:50 PM. Reason: Corrections to response

  11. #11
    Registered User
    Join Date
    08-02-2020
    Location
    Israel
    MS-Off Ver
    2016-2013
    Posts
    13

    Re: send e-mail from excell when cell value is...

    Hi!!

    How I change that the range is a column, for example, I need to check if there is any value at column H that respond to the condition "<now()+30"
    Thank you!

  12. #12
    Valued Forum Contributor
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    932

    Re: send e-mail from excell when cell value is...

    This is the line:

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    08-02-2020
    Location
    Israel
    MS-Off Ver
    2016-2013
    Posts
    13

    Re: send e-mail from excell when cell value is...

    wwwwowwww!!!!!!
    Thank you!!!!! it works perfect!!

  14. #14
    Registered User
    Join Date
    08-02-2020
    Location
    Israel
    MS-Off Ver
    2016-2013
    Posts
    13

    Re: send e-mail from excell when cell value is...

    Thank you!!!

  15. #15
    Valued Forum Contributor
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    932

    Re: send e-mail from excell when cell value is...

    I'm glad it worked for you. If that takes care of your original question, please select*Thread Tools*from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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 E-Mail if cell contains certain value
    By Msuliq in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-31-2017, 08:26 AM
  2. Send e-mail based on cell value
    By Dietcoke1953 in forum Excel General
    Replies: 2
    Last Post: 05-20-2017, 08:14 PM
  3. Replies: 1
    Last Post: 03-11-2014, 12:24 PM
  4. Send to mail recipient, 1 worksheet, 2 cell ranges containing e-mail addresses
    By caladai in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-28-2013, 02:26 PM
  5. How to e-mail selected row and use e-mail address in a cell to send e-mail from excel
    By syedalamgir in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-27-2010, 02:15 AM
  6. Send e-mail automatically from excell
    By maxsuel.pena@dana.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2005, 12:05 PM
  7. help with send mail through excell
    By Maya in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-16-2005, 02:06 PM

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