Filter Usind a Combo Box

  • Thread starter Thread starter rob m
  • Start date Start date
R

rob m

I have a combo box on one worksheet containing a list of peoples names
and another sheet containing order details with the people name.

What I want to do is select the name from the combo box and this will
filter the order worksheet to show only the name selected and delete an
other rows.

I can get it to filter by the sales name using the code below but not
delete the other rows

Sheets("Order Details").Select
Selection.AutoFilter Field:=2, Criteria1:=Worksheets("Orderbook
Splits").Range("AD1").Value

I cannot change the criteria from "=" to "<>" has i get an error
message. Does any one know the code that could do this?

Thanking you in advance.

Rob M
 
Enclose the <> in quotation marks:

Selection.AutoFilter Field:=2, _
Criteria1:="<>" & Worksheets("Orderbook Splits").Range("AD1").Value
 
Back
Top