Block users from entering specific data

Watchdawg

Board Regular
Joined
Jan 21, 2015
Messages
84
This is probably easy for you folks. I have a tab, "Request Form" where the customer will place the material they're requesting along with quantity and unit of measure (B3, C3, D3). The first tab, "Items Not To Move" has a list of materials that they are not permitted to request. So here's my dilemma...
If the customer enters a value into B3 (Requested Material) on the Request Form tab that is found in the "Items Not To Move" tab, A1:A120, I need it to issue a pop-up message informing them that the material is blocked for transfer, and then keep them from entering any data in C3 or D3 (or delete the data from the entire row).

Pipe Dream?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Select B3 on your request form
Select Data validation from the Data tab in the ribbon
in Allow: select Custom
in Formula use. Adjust the range $A$2:$A$99 so it has the list of items you do not what to be entered.

Code:
=COUNTIF('Items Not To Move'!$A$2:$A$99,B3)=0
 
Upvote 0
Absolutely perfect! Thank you!
No, a message box pops up that states "The value you entered is not valid. A user has restrivted values that can be entered into this cell". Is there any way to alter the message so that I can add something more descriptive to give them instructions on how to proceed if they have a special circumstance? I'm assuming this would include VB code?
 
Upvote 0
Select B3 and go back into data Validation.
You will see the validation you just setup
click on the Error Alert tab and you can enter a custom message.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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