Macro that filter data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create a command button that will filter specifice product. Could
you please give me sample macro that filter data.

Thanks.
 
Sub test()
'
' test Macro
' Macro recorded 11/01/2006 by Kevin M
'

'
Columns("Your range of data").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="your filter criteria"
End Sub

All this does is invoke autofilter and then selects a range for the user.

HTH
Kevin M
 

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