conditionally restricting values

  • Thread starter Thread starter __jakal__
  • Start date Start date
J

__jakal__

Hello,
I want to restrict values in a particular column based on the value in other
column. For eg.

if column A has value int then column B should be restricted to values
1,2,3,4,5
if column A has value bool then column B should be restricted to values true
and false.
How do I achieve this ? Can I use macros to do this? How?

Thanks
 
Hi

No VBA needed. Data>Validation should do.

In any range of cells enter the numbers 1,2,3,4,5 Name this range "int"

In any other range of cells enter the Booleans TRUE, FALSE Name this
range "bool"

Now, select B1 to B whatever, go to Data>Validation and chhose List then
in the Source box use: =INDIRECT($A1)



** Posted via: http://www.ozgrid.com
Excel Templates, Training, Add-ins & Business Software Galore!
Free Excel Forum http://www.ozgrid.com/forum ***
 
Thanks!!!
but I have another problem.....if it is string I dont want any validation to
be done and the list box should not appear.
Is this possible.....
 
Back
Top