Data Validation to allow choice of two numbers only (without using a List)

Jim885

Well-known Member
Joined
Jul 8, 2012
Messages
663
Its been a while since I needed this, so I forgot how to do it.

I need a way for a user to type into a cell only one of two choices of numbers. Either 50 or 100. I can do this with Data Validation on a list box, but I need the cell to only allow the entry of 50 or 100 by the user typing the value in the cell. Any other number entered in the cell should result in a message box alert telling the user that only 50 or 100 are allowed to be entered in the cell. A macro might suffice, but the primary goal is for a way to do this with data validation.

Thanks for any help.
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Weazel

Well-known Member
Joined
Dec 24, 2011
Messages
3,155
maybe...

data validation...custom...=OR(A1=50,A1=100)
 

Jim885

Well-known Member
Joined
Jul 8, 2012
Messages
663
That's it.

I was close, my best guess was trying =OR(50,100) ... which didn't work.

Thanks!!!
 

Watch MrExcel Video

Forum statistics

Threads
1,123,271
Messages
5,600,650
Members
414,399
Latest member
Ninjee

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
Top