ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro that filter data (https://www.excelbanter.com/excel-worksheet-functions/64529-macro-filter-data.html)

Conditional Formatting

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

Thanks.

Kevin M

Macro that filter data
 
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

"Conditional Formatting" wrote:

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

Thanks.



All times are GMT +1. The time now is 02:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com