Drop Down List
Try put this in ur sheet-tab-code-window
check in H18:H24 and make drop-list in H2
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim t, List
For t = 18 To 24
If Cells(t, "H") < "" Then List = List & "," & Cells(t, "H")
Next
With Range("H2").Validation
.Delete
.Add xlValidateList, Formula1:=List
.InCellDropdown = True
End With
End Sub
"Matt" skrev:
I am trying to construct a drop down list with a variable number of items to
select. I have data in a list (=$H$18:$H$24). Each field is turned on or
off based on exterior parameters. Currently, if my drop down list has half
the possible choices the rest are blank. How do I remove the blank spaces?
Can I do this in the validation screen or do I need to change the list I am
pulling my options from?
|