View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Excel macro filter Like keyword

ps.

If you defined a worksheet name "sourcerange" (insert|name define in xl2003
menus), then maybe...

with me.range("SourceRange")
.AutoFilter Field:=1, Criteria1:="*" & .parent.range("A1").value & "*"
End with

"Jeff via OfficeKB.com" wrote:

Thanks a lot for the help
I am still getting an "object required" error 424
All the data, combo box and source range in on the same worksheet.
In cell A1, I have the keyword cell (which is the linked cell for my combo
box)
My headers start on A2 to AA2 and have autofilter set up, the data itself
starts cell A3...
I would like that when I select the correct value from the combobox, it
filters my data by searching for a matching keyword in column 1.
I hope this is more clear.

Thanks for the help.

Dave Peterson wrote:
Is A1 on the same worksheet as the sourcerange?

with SourceRange
.AutoFilter Field:=1, Criteria1:="*" & .parent.range("A1").value & "*"
End with

The parent of sourcerange is the worksheet that owns it.

I am trying to program a filter so that it searches a keyword among a string
of characters in my first column

[quoted text clipped - 17 lines]
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201003/1



--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201003/1


--

Dave Peterson