PDA

View Full Version : Need Help coding a Dropdown List in a Cell



kirbz
10-11-2011, 03:05 AM
Need help in coding to have a condition in using a drop down list..

what I wanted to do is create a drop down list but the value of the drop down list will depend on the value of another cell..

for example if the value of Cell W1 = "PC" the value of the cell with the drop down list will contain "CTN and BOX" which is Y1.. but if the value of W1 = "BDL" the value of Y1 will contain "ROLL and GNY"...

and in addition.. the change of contents of Y1 will occur when I have selected Cell Y1..

is it possible and how to code it in VBA?

Thanks. hop you understand what I mean...

Bob Phillips
10-11-2011, 03:31 AM
I am confused by your explanation.

I first thought that the dropdown would be in W1, but then you say that Y1 might be x or y.

And what does this mean .. the change of contents of Y1 will occur when I have selected Cell Y1..

kirbz
10-11-2011, 06:24 PM
yes.. the drop down list will be at Y1 cell.. but the contents will depend on W1 value.. for example..

column W1 = "PC" then column Y1 will be = "CTN and Box"

but if Column W1 change to = "BDL" then column Y1 will be = "ROLL and GNY"

then the trigger of the change of the contents of Y1 is when I select or click Cell Y1..

is it clear now? can the above question be done?

Bob Phillips
10-12-2011, 12:47 AM
Try this formula with a DV cutom type

=OR(AND($W$1="PC",OR($Y$1="CTN",$Y$1="box")),AND($W$1="BDL",OR($Y$1="ROLL",$Y$1="GNY")))