Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
I am trying to use your macro but have run into a problem. No matter what selection I make from my drop down box, the macro hides all of the rows. Would you mind modifying the code so that all rows that meet the selection criteria are displayed? Also, how can we include an option to display all rows if needed? Thanks! Randy "Tom Ogilvy" wrote: Use a dropdown box from the forms toolbar and assign it this macro (enter the macro first in a general module) Sub Myfilter() Dim cbox as Dropdown, s as String dim rng as range, cell as Range s = appliction.Caller set cbox = Activesheet.Dropdowns(s) set rng = Range("B2", cells(rows.count,2).End(xlup)) rng.EntireRow.Hidden = False for each cell in rng if cell.Value < cbox.Value then cell.EntireRow.Hidden = True end if Next end sub as written, it "filters" on values in column B. Adjust to suit. -- Regards, Tom Ogilvy "JDebo" wrote: Yes I know that how to use Autofilter, I want to use a control box for other users.... do you not think its possible? "Tom Ogilvy" wrote: Why not us data=Filter=Autofilter and just select the filter criteria from the dropdown or if you want to type it in, select custom from the dropdown and type in your criteria. Other than that, you would just use the change event to turn your cell entry into a filtered database. -- Regards, Tom Ogilvy "JDebo" wrote: I want to have a Text box or Control Box (Something like this) that I can type data in and hit "Enter" to filter my worksheet using this Data. Is this Possible? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
filter text | Excel Worksheet Functions | |||
filter in text | Excel Discussion (Misc queries) | |||
Filter text in a column by its Indent, to remove certain text | Excel Discussion (Misc queries) | |||
Keep text filter away numbers | Excel Worksheet Functions | |||
advanced filter won't allow me to filter on bracketed text (-456.2 | Excel Discussion (Misc queries) |