LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default Filter using a Text Box??

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
filter text willemeulen[_26_] Excel Worksheet Functions 2 June 5th 09 09:45 PM
filter in text Robin Excel Discussion (Misc queries) 1 July 3rd 07 07:46 AM
Filter text in a column by its Indent, to remove certain text 99TZ250 Excel Discussion (Misc queries) 1 May 21st 06 08:53 AM
Keep text filter away numbers KH_GS Excel Worksheet Functions 1 March 30th 06 07:30 AM
advanced filter won't allow me to filter on bracketed text (-456.2 LucianoG Excel Discussion (Misc queries) 1 December 6th 04 08:38 PM


All times are GMT +1. The time now is 10:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"