ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   data validation (https://www.excelbanter.com/excel-discussion-misc-queries/32775-data-validation.html)

Hardy03

data validation
 
In cell A1 users are required to enter either 0,1 or 2. Firstly how do I make
this cell only accept these values and secondly, if they enter 1 (not 0 or 2)
I need B1 to become a listbox, listing two options.
Can anyone help please?

I would like B1 to be blank if they put a 0 or 2 in A1


Anne Troy

You need what many call Conditional Dropdowns. Check out my recent post
he
http://www.vbaexpress.com/forum/show...1212#post31212

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Hardy03" wrote in message
...
In cell A1 users are required to enter either 0,1 or 2. Firstly how do I

make
this cell only accept these values and secondly, if they enter 1 (not 0 or

2)
I need B1 to become a listbox, listing two options.
Can anyone help please?

I would like B1 to be blank if they put a 0 or 2 in A1




Hardy03

Had a look at conditional formatting, but doesn't seem to allow you to
constrain a cell to 0,1 and 2 values, also it doesn't help with the showing
of the listbox in B1 (or am i doing something wrong).
Can't access your link

"Anne Troy" wrote:

You need what many call Conditional Dropdowns. Check out my recent post
he
http://www.vbaexpress.com/forum/show...1212#post31212

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Hardy03" wrote in message
...
In cell A1 users are required to enter either 0,1 or 2. Firstly how do I

make
this cell only accept these values and secondly, if they enter 1 (not 0 or

2)
I need B1 to become a listbox, listing two options.
Can anyone help please?

I would like B1 to be blank if they put a 0 or 2 in A1





Bob Phillips

I think Anne meant data validation not conditional formatting, see
http://www.contextures.com/xlDataVal01.html

And CF does allow multiple values. Change the condition to FormulaIs and use
a a formula like

=OR(A1=0,A1=1,A1=2)

--
HTH

Bob Phillips

"Hardy03" wrote in message
...
Had a look at conditional formatting, but doesn't seem to allow you to
constrain a cell to 0,1 and 2 values, also it doesn't help with the

showing
of the listbox in B1 (or am i doing something wrong).
Can't access your link

"Anne Troy" wrote:

You need what many call Conditional Dropdowns. Check out my recent post
he
http://www.vbaexpress.com/forum/show...1212#post31212

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Hardy03" wrote in message
...
In cell A1 users are required to enter either 0,1 or 2. Firstly how do

I
make
this cell only accept these values and secondly, if they enter 1 (not

0 or
2)
I need B1 to become a listbox, listing two options.
Can anyone help please?

I would like B1 to be blank if they put a 0 or 2 in A1








All times are GMT +1. The time now is 07:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com