Popup Message with data from another cell

sd7000

New Member
Joined
Nov 21, 2008
Messages
3
Hi all,
I have created a popup message when a cell falls below a value. What I would like to do, is if that value is below 0, then I would like the text from another cell be put into my popup message at the beginning of the message. Example, if the cell value in P5 <0, then my popup message would be "(text from cell B5), you have exceeded your hours"
Thanks in advance, Steve
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Post your code (that is working) BEFORE the improvemnet you now wish to make.
 
Upvote 0
Sorry about that, here is the code.

Code:
Private Sub Worksheet_Calculate()
    If [P5] < 0 Then MsgBox "You have exceeded your allotted Hours, please correct.", vbOKOnly + vbCritical, "Holiday Hours"
End Sub
 
Upvote 0
I got it, thanks for the help. Here is what I used. Range("B5").Value &
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,077
Messages
6,122,995
Members
449,094
Latest member
masterms

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top