• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Send Email automatically from Excel based on cell colour|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Send Email automatically from Excel based on cell colour|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosSend Email automatically from Excel…
sp_PrintTopic sp_TopicIcon
Send Email automatically from Excel based on cell colour
Avatar
KD Dh
Member
Members
Level 0
Forum Posts: 7
Member Since:
January 28, 2020
sp_UserOfflineSmall Offline
1
January 29, 2020 - 8:28 am
sp_Permalink sp_Print sp_EditHistory

Hi,

 

I require to send emails from Excel when the colour is red on the last column in the screenshot "Expiry date".

I want the email to be sent automatically to "Tech" which is column 3 in the screenshot if they have a red expiry date.

Any chance this is possible?

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
January 29, 2020 - 9:33 am
sp_Permalink sp_Print

Hi,

I'd usually look to do something like this using a Worksheet_Change event but unfortunately changing the colour of a cell does not trigger a change event in Excel. So you'd need to make some other change to the sheet/cell to trigger the VBA.

Once this is done you could then modify the code here to send the email.

In the Tech column is just the letter A, not an email address?

Regards

Phil

Avatar
KD Dh
Member
Members
Level 0
Forum Posts: 7
Member Since:
January 28, 2020
sp_UserOfflineSmall Offline
3
January 29, 2020 - 9:37 am
sp_Permalink sp_Print

Hi,

 

It should be a email address but for the sake of an example, i just used A.

 

How about using a change in text to trigger event change?

 

Im not too good at vba so not sure how i would write it.

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
4
January 29, 2020 - 10:27 am
sp_Permalink sp_Print

Hiya,

Yes, changing a cell value would trigger an event that would then run the VBA to send the email.

In order to do this I'd need to know what cell(s) would change and what value in the cell indicates that an email should be sent?

What will the contents of the email be?

Regards

Phil

Avatar
KD Dh
Member
Members
Level 0
Forum Posts: 7
Member Since:
January 28, 2020
sp_UserOfflineSmall Offline
5
January 29, 2020 - 11:26 am
sp_Permalink sp_Print

The cells changed would be the column Q, the value in the cell i guess should be "expired".

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
6
January 29, 2020 - 1:16 pm
sp_Permalink sp_Print

OK so Q currently contains a date - you'll change this so it contains "expired" or some other text?

What will the contents of the email be?

Avatar
KD Dh
Member
Members
Level 0
Forum Posts: 7
Member Since:
January 28, 2020
sp_UserOfflineSmall Offline
7
January 30, 2020 - 9:00 am
sp_Permalink sp_Print

Yep expired, for now the contents can just say "test" i guess.

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
8
January 30, 2020 - 1:51 pm
sp_Permalink sp_Print

Hi,

Please see attached.

The code for generating he email is taken from this post : VBA to create email and send with Outlook

Regards

Phil

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Catalin Bombea, Velouria
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 204
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Murat Hasanoglu
Brett Dryland
Saeed Aldousari
Bhuwan Devkota
Kathryn Patton
Maria Conatser
Jefferson Granemann
Glen Coulthard
Nikki Fox
Rachele Dickie
Forum Stats:
Groups: 3
Forums: 24
Topics: 6222
Posts: 27291

 

Member Stats:
Guest Posters: 49
Members: 31913
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.