View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
nbaj2k[_50_] nbaj2k[_50_] is offline
external usenet poster
 
Posts: 1
Default Can I build a Find function into my spreadsheet without a button?


I was looking to see if its possible to build a find function into my
spreadsheet.

What I want it to do is if I type something in A1, I want it to only
show the rows include cells that have that in it. For example if I
typed in Basketball, I want it to search *Product* throughout the
worksheet and only show the rows that have that in it.

I was hoping to do it without a button, so i just click off of the cell
and it does the search. If I type back in the cell and click off of it
it does it again.

I was able to do it with a button and autofilters, making A1 equal the
criteria, but I wanted to know if it was possible just to type
something in and click off and it searches. The code below is what I
have now, but it only works if I assign that code to a button. If I
can get the code below to work without having to click a button and
just click off of the cell, that would be fine too.

Thanks,

~J

Dim Entry As String
Entry = "*" & Range("A1") & "*"
Range("A2").Select
Rows("3:3").Select
Selection.AutoFilter
Range("A3").Select
Selection.AutoFilter Field:=1, Criteria1:=Entry, Operator:=xlAnd


--
nbaj2k
------------------------------------------------------------------------
nbaj2k's Profile: http://www.excelforum.com/member.php...o&userid=36480
View this thread: http://www.excelforum.com/showthread...hreadid=574376