VBA Code Help - Multiple Data Validations with Unique Error Messages

Azaka

New Member
Joined
May 21, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi there, I'm very green to VBA and am trying to write a code to run multiple data validations in tables, each with their own hard stop error message.

The spreadsheet is a data entry spreadsheet and here are the rules:
1) data entered in cell must be numeric - Shading cell with light red color and Popup with error returning you to cell to fix it
2) if data is entered in any of cells C7:H7, then cell B7 must have a value as well - Popup with text box asking what should be in B7 and it auto populating B7
3) data in cell D7 must not exceed value in C7 - Popup with error returning you to cell D7 to fix
4) sum of data in cells F7:G7 cannot exceed value in E7 - Popup with error returning you to last cell data was entered in

These rules would run in tables until the end user has no more data to enter.

I cannot tell you how much time I've tried drafting individual codes and search the error messages when they don't work but am hoping someone on here can help.

Thank you much!!!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,215,945
Messages
6,127,856
Members
449,411
Latest member
adunn_23

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