I am having trouble implementing this code. Do I just set up a new macro, paste in your code and edit where the cell reference is? My if statement is in cell AA50. I tried doing this, but nothing happened when cell AA50 equalled zero. What am I doing wrong? Thanks.
No, you do not set up a new macro, you paste this line
Code:
If Cells(50, "AA").Value = 0 Then MsgBox "PLease change the values", vbCritical
in the Worksheet_Change module, which you can find by following these steps.
1. Press Alt + F11 to bring the VBE window.
2. On the left hand side you should see all your sheets you are working on under "Microsoft Excel Objects"
3. Double click the sheet where your formula is.
4. You should see two drop-down boxes one will say "General" and the other "Declarations"
5. Change the "General" to worksheet and "Declarations" to "Change"
Now, try and change your values. Hope this one works and sorry for such a late reply.
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.