I require two drop down list which are dependent. In VBA, I have tried the creation of drop down for single list but I'm unable to make it dependent. The drop down list is like
Contents of First drop down list
dd1
dd2
dd4
dd5
dd6
the corresponding list2 is
for dd1
ddd1
ddd2
ddd3
for dd2
ddd4
ddd6
like wise.
I have done with the code
With Range("D1").Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=TempList
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End If
There mustn't be any spaces/empty cells in the list.
I have also tried this
But the above code supports for a single cell drop down. I need whole cells in column as drop down.
Or is there any method to create directly the dependent drop downs using formula with elimination of blank cells in both the columns.
Thanks in advance