ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Multiple Drop Down List (https://www.excelbanter.com/excel-discussion-misc-queries/179109-multiple-drop-down-list.html)

tigermoth

Multiple Drop Down List
 
How do I create a drop down list for selection.

If I want the following in my drop down lists:-
For Column C Row 3 to 7
89901 Blue Strips 1"
89902 Blue Strips 2"
90001 Red Strips 1"
90002 Red Strips 2"

and Column E Row 3 to 7

S0001 XSmall
S0002 Small
S0003 Large
S0004 XLarge

Say if I select 89902 Blue Strips 2" and S0003 Large from Column C and E
drop down lists and only want 89902 and S0003 to appear in the respective
columns.


Bernie Deitrick

Multiple Drop Down List
 
Tiger,

You can use the worksheet change event: copy this code, right-click the sheet tab, select "View
Code" and paste the code in the window that appears.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("C3:C7, E3:E7")) Is Nothing Then Exit Sub
If Target.Cells.Count 1 Then Exit Sub
Application.EnableEvents = False
Target.Value = Left(Target.Value, 5)
Application.EnableEvents = True
End Sub

HTH,
Bernie
MS Excel MVP


"tigermoth" wrote in message
...
How do I create a drop down list for selection.

If I want the following in my drop down lists:-
For Column C Row 3 to 7
89901 Blue Strips 1"
89902 Blue Strips 2"
90001 Red Strips 1"
90002 Red Strips 2"

and Column E Row 3 to 7

S0001 XSmall
S0002 Small
S0003 Large
S0004 XLarge

Say if I select 89902 Blue Strips 2" and S0003 Large from Column C and E
drop down lists and only want 89902 and S0003 to appear in the respective
columns.





All times are GMT +1. The time now is 05:41 PM.

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