I want to create a pop-up message for two of the cells that contain a formula. Cell A10 counts dates entered in column A for the current calendar year. E10 totals the hours and minutes in column E. I was able to create the following code:
Private Sub Worksheet_Calculate()
If Range("A10").Value > 3 Then MsgBox "Employee has reached the tardy threshold. Contact HR Coordinator."
If Range("E10").Value > 2.667 Then MsgBox "Employee has reached the 64-hour threshold for sick leave. Contact HR Coordinator. If employee provides medical verification, enter hours over 64, using calculator on the right, in a new row under the Pre-Approved and Authorized Absences section."
End Sub
I would like it to pop up when the total is => a certain value. I would not like it to pop up if data in other cells outside that column is entered (right now it seems to pop up once the condition is met everywhere on the sheet). If the user deletes rows and it makes the total < the certain value, I would not like it to pop up, but if the user adds more data again to make the total => the value, I would like it to pop up again. This is a dynamic, ever-changing sheet, but I am not sure how to make it work this way.
Private Sub Worksheet_Calculate()
If Range("A10").Value > 3 Then MsgBox "Employee has reached the tardy threshold. Contact HR Coordinator."
If Range("E10").Value > 2.667 Then MsgBox "Employee has reached the 64-hour threshold for sick leave. Contact HR Coordinator. If employee provides medical verification, enter hours over 64, using calculator on the right, in a new row under the Pre-Approved and Authorized Absences section."
End Sub
I would like it to pop up when the total is => a certain value. I would not like it to pop up if data in other cells outside that column is entered (right now it seems to pop up once the condition is met everywhere on the sheet). If the user deletes rows and it makes the total < the certain value, I would not like it to pop up, but if the user adds more data again to make the total => the value, I would like it to pop up again. This is a dynamic, ever-changing sheet, but I am not sure how to make it work this way.