How to filter data in another sheet

  • Thread starter Thread starter AKS
  • Start date Start date
A

AKS

I have huge data in sheet1 with column headers and I would like to filter few
data in sheet2 matching with queries like data of a particular item between
two dates.

Can anybody help me out?
 
hi AKS
I use this macro for same question:

Sub FilterMe()
On Error Resume Next

Sheets("Sheet1").Select

Selection.AutoFilter Field:=6, _
Criteria1:=">=" & Range("Sheet2!A1").Value

End Sub
you must put particular item in A1
it may be help you
 
Hi,
Thanks for your quick response.
My problem is that I have 3 criterion

in A1 item Code
in A2 From Date
in A3 To Date

Please help!!

Best regards,
AKS
 
Hi,
you are welcome,
If your item cods in column H and dates in column F in sheet1, try this
macro, you can change Field numbers as your columns number.

Sub filterme()

'On Error Resume Next

Sheets("sheet1").Select
Selection.AutoFilter Field:=8, Criteria1:="=" & Range("Sheet2!A1").Value
Selection.AutoFilter Field:=6, Criteria1:=">=" & Range("Sheet2!A2").Value,
Operator:=xlAnd _
, Criteria2:="<=" & Range("Sheet2!A3").Value


End Sub

If you have problem, try in format cell by 'general' , in cell A1 & A2

please feedback;

kind regards,
Nader
 
hi
thanks for the feedback.

If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,

nader
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top