Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

message box warning

  Asked By: Fabiana    Date: Dec 02    Category: MS Office    Views: 920
  

I am a newbie, so please forgive the stupid question. I need to have a message
box pop up:
1) when the value of cell H5 is higher than B8 - Message should say something
like: "You
have exceed the maximum OB allowance!"

2) when the value of H5 is higher than B10 - Message should say something like:
"You have
exceeded maximum RET allowance!"

Cell B10 will always be less than or equal to B8, the messages should pop up
independently
and if H5 us greater than both B8 and B10, both messages should pop up.

Is this possible?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Alice Hughes     Answered On: Dec 02

We need to identify the trigger conditions:

Is the condition likely to be caused by changing the values in B8 and B10?
Is it likely to be caused by the values in B8 and B10 changing as a result of
changes to another cell?
Is it likely to happen because the value of H5 changes as a result of changes
to another cell.
Do B8, B10, and H5 contain formulas or directly entered numeric values.

We also need to identify how much of an overhead you spreadsheet can stand.
Is your entire workbook, small, medium, large, enormous, or gigantic? (don't
worry too much what these mean exactly<g>) If, for example, your spreadsheet
has 10,000 rows each with 200 cells each of which contains a seven deep nested
IF formula incorporating multiple lookups, we will not want to fire the macro
on every change in every cell.

 
Answer #2    Answered By: Aaminah Khan     Answered On: Dec 02

yes, you can show the message  but only with macro, not with excel.
ex:
if H5 >B10 then msgbox="You have exceeded maximum  RET allowance!"

 
Answer #3    Answered By: Anne Powell     Answered On: Dec 02

Try this

Sub test()

If Range("H5").Value > Range("B8").Value Then
MsgBox "You have exceeded the maximum  OB allowance!"
End If
If Range("H5").Value > Range("B10").Value Then
MsgBox "You have exceeded the maximum RET allowance!"
End If

End Sub

 
Didn't find what you were looking for? Find more on message box warning Or get search suggestion and latest updates.




Tagged: