Hey all, lโm new here and hope I can get some help with a macro that I have spent hours trying to get correct and have not had any luck. I have a workbook that tracks data from employees and what I need is an automatic email sent to HR when either of two columns (column AE and AF) reach a certain cell value. It will also need to send another email with any increases to the cell value after the starting value is reached but decreases to the cell value will not create an email. I have been trying to get this put together for some time now but I just canโt seem to figure it out so Iโm asking any of you experts for some help. Any help would be greatly appreciated!!! Below is what I believe to be the necessary data and if Iโve missed something please let me know.
Using Excel 2013
Email is Outlook
Column B is populated with employee names
Column AE starting value = 4
Column AF starting value = 40
The two columns are populated with formulas, they are not a manual entry
The worksheet title is โSummaryโ and this is the only worksheet in this workbook that the macro needs to be applied to.
I would like, but not required, to have the email sent when the workbook is closed. It can be sent as soon as the cell is changed.
The data collection starts on Row 7 but the last row fluctuates depending on the number of employees
All emails will be sent to the same email address, letโs use hrmanager@companyabc.com
Email Subject = โ(Data in Column B) attendanceโ
The body of the emails needs to read:
โHR Manager,
(Data in Column B) currently has (data in AE) tardies in the past year and needs to have his/her attendance reviewed.
Thanksโ
Or
โHR Manager,
(Data in Column B) currently has (data in AF) unexcused hours in the past year and needs to have his/her attendance reviewed.
Thanksโ