VBA - MsgBox Based on Cell Value
GustavoSRP
Posted messages
8
Status
Member
-
yg_be Posted messages 23437 Registration date Status Contributor Last intervention -
yg_be Posted messages 23437 Registration date Status Contributor Last intervention -
Hello everyone,
Thank you in advance for your help.
I am a beginner with VBA in Excel.
I need to display a MsgBox based on the value of a given range of cells.
For example:
If the values in the range (A1:A41) are greater than 29.99, a MsgBox should appear with a "text X"
Please take into account that there is a formula in the range of cells that gives the result.
A big thank you to everyone
Gustavo
Thank you in advance for your help.
I am a beginner with VBA in Excel.
I need to display a MsgBox based on the value of a given range of cells.
For example:
If the values in the range (A1:A41) are greater than 29.99, a MsgBox should appear with a "text X"
Please take into account that there is a formula in the range of cells that gives the result.
A big thank you to everyone
Gustavo
3 answers
yg_be
Posted messages
23437
Registration date
Status
Contributor
Last intervention
Ambassadeur
1 588
Hello, when should the message appear? Upon opening the file?
You write "the displayed values are greater than 29.99": do you want to display the message only if all values are greater?
You write "the displayed values are greater than 29.99": do you want to display the message only if all values are greater?
The values of each cell change because each cell refers to another cell that performs an addition. The cell in question calculates the average amount over 52, for example.
Cell A1 contains the following formula: =B1/52
Cell B1 contains the following formula: SUM(B2:B12)
When cell A1 exceeds 29.99, a text message must appear.
So, when one or more cells in the range (''A1:A50'') reach 30 or more, the text message is displayed.
Cell A1 contains the following formula: =B1/52
Cell B1 contains the following formula: SUM(B2:B12)
When cell A1 exceeds 29.99, a text message must appear.
So, when one or more cells in the range (''A1:A50'') reach 30 or more, the text message is displayed.
I will see if I can do something with your suggestion, although it doesn't tell me how I can make a MsgBox appear when a cell X exceeds the amount of 29.99.