Only wanting certain text to be allowed as input

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,047
I have a column which I want a 4 letter code to be input, however there are 80 different versions of code, ie AYHU or SHTG etc etc but I only want these specific codes to be inout, if someone tries to enter a code which is not in a pre-determined list I dont want the user to be able to carry on. Now i guess this can be done with data validation and VLOOKUP but I cant remember how....any help please!!


Paul
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi, Paul.

Not with VLOOKUP.

Use Data>Validation>Settings, Allow:List and point to the source of your list of allowable entries.

Barry
 
Upvote 0
I had tried that but my 'list' is on page 3 and it comes up with a message saying You may not use references to other worksheets for data validation criteria ??? which I dont understand, as i am sure I have done this before??? :confused:
 
Upvote 0
Pauljj said:
I had tried that but my 'list' is on page 3 and it comes up with a message saying You may not use references to other worksheets for data validation criteria ??? which I dont understand, as i am sure I have done this before??? :confused:

Try giving your list a "named range"
 
Upvote 0
Yes, as 2rrs says, give the list on sheet 3 a name, such as MyValidationList, and then, in Data>Validation>Settings, in the Source bar, enter =MyValidationList.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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