Create an Alert Message if a value is lower than expected

Pumpk1n

Board Regular
Joined
Jan 31, 2017
Messages
86
Office Version
  1. 365
Platform
  1. Windows
I have a macro that formats data and I would like one check for a value. If the value in the sheet called "QualityCheck" Cell c15 is less than 25, then create an alert message "value is less than 25 - verify inputs". They can then click "OK" and the macro should continue on. Can I get a little help with how to write the VBA code for that?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I have a macro that formats data and I would like one check for a value. If the value in the sheet called "QualityCheck" Cell c15 is less than 25, then create an alert message "value is less than 25 - verify inputs". They can then click "OK" and the macro should continue on. Can I get a little help with how to write the VBA code for that?

I got it! :)

If Sheets("QualityCheck").Range("c15").Value < 25 Then
MsgBox "Hey, Sunshine. Double Check your work - Did you copy all the way over to the Shared Value Column? C&S counts are too low!", vbaokonly
End If
 
Upvote 0

Forum statistics

Threads
1,215,456
Messages
6,124,939
Members
449,197
Latest member
k_bs

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