![]() |
search and filter results macro
My problem is that i have a worksheet with a number of text columns; i wish
to search one of the colomns (colomn H) and filter (the entire row) in results. I know i can use a filter; but for ease of use with non excel litterate people i would like to use a macro where they need to enter the criteria into a cell; and link the search criteria to that cell such as (H14). Your help is much appreciated |
search and filter results macro
Instead of them typing into a cell you could use an InputBox
Option Compare Text Sub Filter_Stuff() Dim whatwant As String whatwant = InputBox("Enter criteria.") Range("H1").Select With ActiveSheet.UsedRange Selection.AutoFilter Selection.AutoFilter Field:=1, _ Criteria1:=whatwant, Operator:=xlAnd End With End Sub Assign to a button for users to to click on. Gord Dibben MS Excel MVP On Thu, 15 Nov 2007 16:14:00 -0800, SearchandDeliver wrote: My problem is that i have a worksheet with a number of text columns; i wish to search one of the colomns (colomn H) and filter (the entire row) in results. I know i can use a filter; but for ease of use with non excel litterate people i would like to use a macro where they need to enter the criteria into a cell; and link the search criteria to that cell such as (H14). Your help is much appreciated |
All times are GMT +1. The time now is 05:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com