Autofilter

  • Thread starter Thread starter Freddie
  • Start date Start date
F

Freddie

Hi, is there anyway I can use the aoutofiler with a reference to a different
sheet in a workbook.
I would like to use a macro, if I put in this valu here and push the button,
that value shows i a list in two other seprate sheets in the same workbook.

/Freddie
 
Yes I have and no, that is not what I need in this case.

I need the rst of all data to be hidden and I only want to show the rows
with the specific code i punch in a preselected place and then the filer
redcoginizes this cod and only shows that.

:) I hardly understand what I want when I read this. Hope you understand.
 
Sub filter_on_cell()
Dim whatfind As Variant
Dim sht As Worksheet
whatfind = Sheets("Sheet1").Range("A1").Value
For Each sht In Sheets(Array("Sheet2", "Sheet3"))
With sht.Range("C:C")
.AutoFilter
.AutoFilter Field:=1, Criteria1:=whatfind
End With
Next sht
End Sub

Enter your value in Sheet1!A1 then push the button.


Gord Dibben MS Excel MVP
 
Back
Top