PC Review


Reply
Thread Tools Rate Thread

How can I get a value from one drop down list to another in excel

 
 
Blaatann
Guest
Posts: n/a
 
      11th Nov 2006
I have created a drop down list using the data validation tool in
excel. When i chose one of the options from the drop down list, i have
another drop down list that contains different values dependent of my
choices in the first drop down list.

My problem is that when i go back to the first drop down list an change
the value there, the default value in the second drop down list don`t
change. And i have to open the second drop down list to get access to
the new values.

Is there a way to get the second drop down list to change the defalult
whenever the first drop down list i changed.

I would be really thankfull for some help one this one.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Um9uIENvZGVycmU=?=
Guest
Posts: n/a
 
      11th Nov 2006
It sounds like you need to create Dependent Lists....

See Debra Dalgleish's website for instructions:
http://www.contextures.com/xlDataVal02.html

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Blaatann" wrote:

> I have created a drop down list using the data validation tool in
> excel. When i chose one of the options from the drop down list, i have
> another drop down list that contains different values dependent of my
> choices in the first drop down list.
>
> My problem is that when i go back to the first drop down list an change
> the value there, the default value in the second drop down list don`t
> change. And i have to open the second drop down list to get access to
> the new values.
>
> Is there a way to get the second drop down list to change the defalult
> whenever the first drop down list i changed.
>
> I would be really thankfull for some help one this one.
>
>

 
Reply With Quote
 
Blaatann
Guest
Posts: n/a
 
      11th Nov 2006
Thanks for the reply but thatīs unfortunately not the solution for my
problem.

If you check out the sample file from the link you gave me, you will
see my problem. If i choose
fruit from the sample file:this list will appear: Apples
Oranges
Lemons
Grapes

And i can choose from the 4 different fruits. Lets say i choose Lemons.
The value in the second drop down list will be Lemons.

But if i go back and choose vegetables the value in the second drop
down list will still be Lemons.

My problem is that when i choose vegetables in the first drop down
list. I want the default value in the second drop down list to change
to the first value from the vegetable list. In this example Cabbage.

I hope you could help me with this.

Regards
Blaatann

 
Reply With Quote
 
=?Utf-8?B?Um9uIENvZGVycmU=?=
Guest
Posts: n/a
 
      11th Nov 2006
Ahh..you're looking to change one DV cell and have another DV cell's value
automatically clear.

Here's some sample worksheet-level code that you can amend to suit your needs:

Assumptions:
Parent List cells are in A1:A10
Dependent List cells are in B1:B10

'---------Start of Code--------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngAllParentCells As Range
Dim rngDepCells As Range
Dim rngCell As Range

Set rngAllParentCells = Range("A1:A10")
Set rngDepCells = Intersect(Target, rngAllParentCells)

If Not rngDepCells Is Nothing Then
For Each rngCell In rngDepCells.Cells
'Move 1 cell to the right and clear contents
rngCell.Offset(RowOffset:=0, ColumnOffset:=1).ClearContents
Next rngCell
End If

Set rngAllParentCells = Nothing
Set rngDepCells = Nothing
Set rngCell = Nothing

End Sub
'---------End of Code--------


Is that something you can work with?

***********
Regards,
Ron

XL2002, WinXP


"Blaatann" wrote:

> Thanks for the reply but that4s unfortunately not the solution for my
> problem.
>
> If you check out the sample file from the link you gave me, you will
> see my problem. If i choose
> fruit from the sample file:this list will appear: Apples
> Oranges
> Lemons
> Grapes
>
> And i can choose from the 4 different fruits. Lets say i choose Lemons.
> The value in the second drop down list will be Lemons.
>
> But if i go back and choose vegetables the value in the second drop
> down list will still be Lemons.
>
> My problem is that when i choose vegetables in the first drop down
> list. I want the default value in the second drop down list to change
> to the first value from the vegetable list. In this example Cabbage.
>
> I hope you could help me with this.
>
> Regards
> Blaatann
>
>

 
Reply With Quote
 
Blaatann
Guest
Posts: n/a
 
      12th Nov 2006
I did`t get this to work. I`m a newbe in programming, you can download
the document from this link:
http://tfweb.hit.no/2006/EK5_1_06/Do...ekksmenyer.xls

If i choose "Klappluke" in A11 i want C11 to be "Ikke valgt" if i then
go back and choose one of the other options in A11 i want C11 to be
"Ingen".

I hope you can help me.

Regards
Blaatann

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create drop down list from one excel file to another excel. Saravanan.G Microsoft Excel Misc 2 29th Nov 2008 05:57 PM
How to Create a macro from drop down list (Validation List) in excel rajashekar14@yahoo.com Microsoft Excel Programming 0 31st Oct 2006 12:42 PM
My Excel drop-down list eliminates from list options chosen. Help =?Utf-8?B?U3liaWw=?= Microsoft Excel Programming 2 19th Jan 2006 09:19 PM
multiple select from the drop down list in excel. list in one sheet and drop down in sriramus Microsoft Excel Misc 5 27th Oct 2005 06:55 PM
drop down list in excel =?Utf-8?B?QW5keSBC?= Microsoft Excel Misc 4 18th Jul 2005 09:45 PM


Features
 

Advertising
 

Newsgroups
 


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