Auto filter depend in droplist value

Solved/Closed
marvvin - Aug 29, 2011 at 06:37 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Aug 29, 2011 at 10:42 PM
Hello,


I'm wondering if anyone knows some formula to filter data depend in dropdown list

My spreadsheet has a column with the order status which can appear multiple times in no particular order.


I create dropdown list which apprears 5 status of our order at top part of my spreadsheet. Then my table spreadsheet contains multple rows and columns. On the first column where you can find the order status in particular order.

I'd want to this spreadsheet, once i select a order status in my droplist, then the below table details automatically filter those data according to the order status o choose in droplisy.

Is this possible? Or, I should say, is there a simple solution?

Thanks!
Related:

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Aug 29, 2011 at 10:42 PM
It would have been helpful if you have given some more details like
small extract of database
in which cell the validation is located
where is the list of validation in a range, combo box etc.

any how is presumed that your data is like this

hdng 1 hdng2
a 1
s 2
d 3
f 4
g 5
d 6
s 7
a 8
s 9
d 10
f 11
g 12


now your validation list is in the cell L1(i configured that validation list is a,d(in wich way you configured validation for L1)

now try this macro


Sub filtering()
Dim r As Range
Set r = Range("A1").CurrentRegion
ActiveSheet.AutoFilterMode = False
If Range("L1") <> "" Then
r.AutoFilter field:=1, Criteria1:=Range("L1").Value
Else
MsgBox "L1 is blank choose from validation list and rerun macro "
End If
End Sub


does it come nearer to your solution. you can modify the macro
0