Requirement:
The user wants a message box to pop up if the value in cell F19 is > than the value in cell 011. If so, the message should be "IUT is too large for Reference 1".
If not, then it should check to see if the value in cell F19 is > than the value in cell R11. If so, the message should be "IUT is too large for Reference 2".
Solution:
Sub TestMsg() If Range("F19") > Range("O11") Then MsgBox "IUT is too large for Reference 1" ElseIf Range("F19") > Range("R11") Then MsgBox "IUT is too large for Reference 2" End If End Sub
Obtained from the OzGrid Help Forum.
Solution provided by Carim.
See also: Index to Excel VBA Code and Index to Excel Freebies and Lesson 1 - Excel Fundamentals and Index to how to… providing a range of solutions and Index to new resources and reference sheets
See also:
How to set up a pop up message when sum of columns exceeds X |
How to bring an excel userform message box above all other windows |
How to create a pop up message if the length exceeds the limits |
How to display a message for each if the value is greater than the mentioned values |
Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.