ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I get a value from one drop down list to another in excel (https://www.excelbanter.com/excel-programming/377250-how-can-i-get-value-one-drop-down-list-another-excel.html)

Blaatann

How can I get a value from one drop down list to another in excel
 
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.


Ron Coderre

How can I get a value from one drop down list to another in excel
 
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.



Blaatann

How can I get a value from one drop down list to another in excel
 
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


Ron Coderre

How can I get a value from one drop down list to another in ex
 
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



Blaatann

How can I get a value from one drop down list to another in ex
 
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



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

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