+ Reply to Thread
Results 1 to 7 of 7

Email alert if a cell changes due to conditional formatting

  1. #1
    Forum Contributor
    Join Date
    02-03-2018
    Location
    Edinburgh
    MS-Off Ver
    Office Professional Plus 2016
    Posts
    161

    Email alert if a cell changes due to conditional formatting

    Hello everyone.

    Is it possible for excel to send an email alert if a cell changes due to conditional formatting, please?

    Dates in a column are for contract renewal dates.

    Cells in this column are formatted to change colour at 100 days before their end date as an alert.

    If possible I would like an email to alert me to the change, something simple to say 'Contract alert' etc.

    I hope this makes sense?

    Thank you.

  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,863

    Re: Email alert if a cell changes due to conditional formatting

    Not without VBA - shall I move the thread for you?
    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 Contributor
    Join Date
    02-03-2018
    Location
    Edinburgh
    MS-Off Ver
    Office Professional Plus 2016
    Posts
    161

    Re: Email alert if a cell changes due to conditional formatting

    Yes, please Ali.

    Thank you.

  4. #4
    Registered User
    Join Date
    12-13-2023
    Location
    Mansfield, Ohio
    MS-Off Ver
    2019
    Posts
    12

    Re: Email alert if a cell changes due to conditional formatting

    You would need to add code to the Worksheet portion of the code. Any time the workbook is opened, the following would check all dates, and any that match the criteria (<=100 days), it would display an email generated with the dates that match for whichever user opened the workbook. This doesn't touch the conditional formatting, or use it in any way, but does use the same criteria. If you'd prefer a method where the criteria is the formatting of the cells, you'd need to provide more information about which cells are changed and what they're changed to.

    Please Login or Register  to view this content.
    This will display an email that looks like this (assuming Column B is the name of the contract and Column C is the amount of the contract):

    Contract in row 2 needs to be renewed.
    Date: 3/22/2024 | Column B: Settleman Contract | Column C: $1,875,000

    Contract in row 5 needs to be renewed.
    Date: 3/26/2024 | Column B: Herman & Sons | Column C: $500,000
    Etc, etc. You can change "Column B" in the code to be whatever, like "Contract Name", and "Column C" in the code to be "Contract Amount", or whatever you want to display in the email. Note that if you have a dollar amount, it'll display as plain text ($500,000 shows as 500000 in the email), but you get the idea. You can also change the criteria If DateDiff("d", Date, dateInColumnA) > 0 And DateDiff("d", Date, dateInColumnA) < 101 Then to be anything. Currently it just says if the current date is 1-100 days away from the contract renewal date. You can change that to 50-75, 25-90, -25-100 etc to meet your needs. Also note that the date column in this instance is Column A. Change dateInColumnA = ws.Cells(i, 1).Value to meet your needs (i, 1) is the row (i) and the column (1). If your contract renewal date is in Column D, change it to (i, 4).

    Let me know if you need anything else.
    Last edited by mcsythera; 12-22-2023 at 10:21 AM. Reason: Note on conditional formatting

  5. #5
    Forum Contributor
    Join Date
    02-03-2018
    Location
    Edinburgh
    MS-Off Ver
    Office Professional Plus 2016
    Posts
    161

    Re: Email alert if a cell changes due to conditional formatting

    Hi, mcsythera.

    Thank you for your reply and help.

    I just cant get it to work (I have never tried VBA before) I must be doing something wrong.

    I want to pick up the dates in column H, at 100 days before contract end date receive an email reminder.

    Any ideas?

    Thank you.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-13-2023
    Location
    Mansfield, Ohio
    MS-Off Ver
    2019
    Posts
    12

    Re: Email alert if a cell changes due to conditional formatting

    I've attached a working sheet so you can see how it operates. Ensure you enable macros (the file is .xlsm and not .xlsx) and that you have the code in the right place. Since you've never used VBA before, I'd recommend testing out this sheet, showing the Developer tab, and looking through the code to familiarize yourself with what it does. You don't have to know exactly how it works, but the fundamentals of where it goes and how it does what it does can help you understand the backbone of the the sheet. You can copy the code from this test workbook to your actual workbook, save as a .xlsm file, and give that a go as well to see it working with your real dataset.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-03-2018
    Location
    Edinburgh
    MS-Off Ver
    Office Professional Plus 2016
    Posts
    161

    Re: Email alert if a cell changes due to conditional formatting

    Thank you very much for your help!!

+ 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] Setting up an email alert when conditional formatting changes a cell
    By CLRG in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-18-2023, 06:22 AM
  2. Conditional formatting visual clue is not enough - need audible alert
    By witneygrain in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-25-2015, 02:30 PM
  3. Replies: 0
    Last Post: 10-10-2013, 05:14 AM
  4. Alert and filtering based on conditional formatting VBA
    By clapforthewolfman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2013, 12:41 PM
  5. Conditional Formatting Alert because of Due Date
    By ticjac in forum Excel General
    Replies: 7
    Last Post: 05-18-2013, 09:02 AM
  6. Conditional formatting to alert me when a delivery date is due
    By Rex81 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-10-2013, 10:28 PM
  7. Looking for Conditional Formatting formula to alert overlapping times
    By lzuke in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-17-2012, 01:08 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