PDA

View Full Version : Solved: Filter from Drop Down Box



adamsm
07-24-2010, 08:39 AM
Hi,

I've assigned a drop down box to my worksheet where I'm trying to filter the rows as the user selects a text from the drop down box.

The code works fine with the data validation cell. But I'm unable to filter the sheet with the help of the drop down box.

I've attached the workbook with the current code.

Any help on this would be kindly appreciated.

Thanks in advance.

mdmackillop
07-24-2010, 10:01 AM
Sub DropDown6_Change()
Dim rng As Range
Set rng = Range(Cells(10, 11), Cells(Rows.Count, 11).End(xlUp))
rng.AutoFilter field:=1, Criteria1:=Range("MyList")(Range("E2"))
End Sub

adamsm
07-24-2010, 10:29 AM
Thanks for the help. The sheet now gets filtered with the selected word from the drop down box. In doing so it adds a filter arrow to column "K".

If I may ask, how could I filter the sheet without making this filter arrow to appear as the sheet was doing with the drop down cell "E2".

Any help on this would be kindly appreciated.

adamsm
07-24-2010, 11:31 AM
Never mind. I guess adding the line VisibleDropDown:=False does the job. Anyways, thanks for the help.