listbox selection

ttowncorp

Board Regular
Joined
Feb 2, 2015
Messages
183
Office Version
  1. 365
Platform
  1. Windows
I have a list box with a dropdown list i created for testing and I want to see how can I select a specific word from my drop down list in one cell, and in the next cell depending on my previous selection only shows what that selection is tied to. so for example. E1 I select "DB9 connector". When i go to F1 and go to my dropdown list it will only show all my different DB9 connector problems only and not my other DB9 problems. My list under FI will have hundreds of different type of problem scenario for me to choose from so I want to make it easier by not having to scroll through so many in my dropdown list. how would a code like that look like? And make it a way so people can not free type in these cells but can only choose from what they select. I been wanting to do this for years but could never really get any help on coding.
 

Attachments

  • db9 replaced.JPG
    db9 replaced.JPG
    41.1 KB · Views: 7
  • db9.JPG
    db9.JPG
    49.6 KB · Views: 7
  • drop down.JPG
    drop down.JPG
    70.1 KB · Views: 8

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Use Named Ranges for this exercise.
On a separate sheet (refer to attached pic), column 1 will be your first dropdown menu. specify the column as named range "items"...Then set your data validation cell to return your list of "items".
Column B...call this range "Number1"
Column C...call this range "Number2"...etc.

In your second validation field specify the list with the following formula: =INDIRECT({cell of first validation field})
This will match your selection in the first validation field with the named range that lists a sub-selection of values.
 

Attachments

  • excel.png
    excel.png
    4.3 KB · Views: 3
Upvote 0
Use Named Ranges for this exercise.
On a separate sheet (refer to attached pic), column 1 will be your first dropdown menu. specify the column as named range "items"...Then set your data validation cell to return your list of "items".
Column B...call this range "Number1"
Column C...call this range "Number2"...etc.

In your second validation field specify the list with the following formula: =INDIRECT({cell of first validation field})
This will match your selection in the first validation field with the named range that lists a sub-selection of values.
okay i was trying to get this to work out, and i'm not to good in coding much, but i'm i using the formula as =indirect(a2-a5)
 
Upvote 0
If your first validation field is in Cell A1 and your second validation field is in B1, then the validation formula for B1 would be =INDIRECT(A1)
 
Upvote 0
If your first validation field is in Cell A1 and your second validation field is in B1, then the validation formula for B1 would be =INDIRECT(A1)
thanks for the help but i guess i just have no clue as to making this still work the way i like to.
 
Upvote 0
Looking back at your original post, you mention that you have a list of hundreds of problem scenarios. You will need to break those down into multiple lists that correspond with the values you have populated in E1.

Book2
ABCDEFGH
1connectorsDB9 ConnectorHDMI ConnectorRJ45 ConnectorDB9_connector
2DB9_connectorproblem 1problem 1problem 1
3HDMI_Connectorproblem 2problem 2problem 2
4RJ45_Connectorproblem 3problem 3problem 3
5problem 4problem 4
6problem 5problem 5
7problem 6problem 6
8problem 7
9problem 8
10problem 9
11problem 10
12
Sheet1
Cells with Data Validation
CellAllowCriteria
G4List1,23,3
G1List=Connectors
H1List=INDIRECT(G1)
 
Upvote 0
In the above example, I used named ranges, for example, range B2:B7 was named "DB9_Connector"...the same as an option in my first dropdown field. C2:C11 is named "HDMI_Connector", etc.
 
Upvote 0
Looking back at your original post, you mention that you have a list of hundreds of problem scenarios. You will need to break those down into multiple lists that correspond with the values you have populated in E1.

Book2
ABCDEFGH
1connectorsDB9 ConnectorHDMI ConnectorRJ45 ConnectorDB9_connector
2DB9_connectorproblem 1problem 1problem 1
3HDMI_Connectorproblem 2problem 2problem 2
4RJ45_Connectorproblem 3problem 3problem 3
5problem 4problem 4
6problem 5problem 5
7problem 6problem 6
8problem 7
9problem 8
10problem 9
11problem 10
12
Sheet1
Cells with Data Validation
CellAllowCriteria
G4List1,23,3
G1List=Connectors
H1List=INDIRECT(G1)
oh wow, now I see it. this makes more since now seeing your example this way. thank you for being patient.
 
Upvote 0

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top