I have some code that I want to execute, but I only want the code to execute if certain cells in a worksheet meet some conditions. If the conditions are not met, then I do not want my code to execute, and instead I want a message box to pop up with a message specific to which cell did not meet the condition.
Cells A1:A3 will only display a "Yes" or a "No"
If cell A1 or A2 or A3 = "No", then don't execute my code
If cell A1 was a "No", then display message box with text "Missing customer number"
If cell A2 was a "No", then display message box with text "Missing Date"
If cell A3 was a "No", then display message box with text "Missing Duration"
Its possible that more than one cell could display a "No" and I would prefer the message box to display all applicable errors at once.
If all three cells display a "Yes" then execute my code with no message box.
Cells A1:A3 will only display a "Yes" or a "No"
If cell A1 or A2 or A3 = "No", then don't execute my code
If cell A1 was a "No", then display message box with text "Missing customer number"
If cell A2 was a "No", then display message box with text "Missing Date"
If cell A3 was a "No", then display message box with text "Missing Duration"
Its possible that more than one cell could display a "No" and I would prefer the message box to display all applicable errors at once.
If all three cells display a "Yes" then execute my code with no message box.