Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Can a Macro utilize an auto filter?

I have column in my spreadsheet and it already has an autofilter associted
with it. I use the custom auto filter function to do a "contains" search for
a particualar string I am looking for. I was wondering if I could create a
macro that is associated to a button that does the same thing? I want an
un-experienced user to be able to type the string they are looking for into a
text box, click the button, and all the fields in that column that contain
the string will appear. Is this possible?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Can a Macro utilize an auto filter?

We're worried that the filter arrow may be too many steps for a user that is
not very used to excel. In your suggestion, when recording the macro, would
I record while I did a search in the autofilter? And when I selected
"contains," what would I put in the box for what I'm searching for, the "&
range ("a1")&" reference?

"Don Guillett" wrote:

It seems that you could just tell them to select from the filter arrow.
However, to do what you want, try recording a macro and then using " &
range("a1") & " instead of the recorded reference.

--
Don Guillett
SalesAid Software

"Susan" wrote in message
...
I have column in my spreadsheet and it already has an autofilter associted
with it. I use the custom auto filter function to do a "contains" search
for
a particualar string I am looking for. I was wondering if I could create
a
macro that is associated to a button that does the same thing? I want an
un-experienced user to be able to type the string they are looking for
into a
text box, click the button, and all the fields in that column that contain
the string will appear. Is this possible?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Can a Macro utilize an auto filter?

Thanks so much for all of the extremly useful information. I have one last
question, is there a way to change the code so that it utilizes the
"contains" function in autofilter as opposed to just the criteria? If there
are multiple strings in a cell that are seperated by commas, I would like it
to still return that cell if any one of the strings is the entered criteria.
Thanks in advance for all your help.


"Don Guillett" wrote:

Sub Filterbasedoncell()' from a UNfiltered range
Range("A1").AutoFilter Field:=1, Criteria1:=Range("c1") '"3"
End Sub
Sub Unfilter()
Selection.AutoFilter
End Sub

--
Don Guillett
SalesAid Software

"Susan" wrote in message
...
We're worried that the filter arrow may be too many steps for a user that
is
not very used to excel. In your suggestion, when recording the macro,
would
I record while I did a search in the autofilter? And when I selected
"contains," what would I put in the box for what I'm searching for, the "&
range ("a1")&" reference?

"Don Guillett" wrote:

It seems that you could just tell them to select from the filter arrow.
However, to do what you want, try recording a macro and then using " &
range("a1") & " instead of the recorded reference.

--
Don Guillett
SalesAid Software

"Susan" wrote in message
...
I have column in my spreadsheet and it already has an autofilter
associted
with it. I use the custom auto filter function to do a "contains"
search
for
a particualar string I am looking for. I was wondering if I could
create
a
macro that is associated to a button that does the same thing? I want
an
un-experienced user to be able to type the string they are looking for
into a
text box, click the button, and all the fields in that column that
contain
the string will appear. Is this possible?






Reply
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
auto filter within a macro Sean Excel Discussion (Misc queries) 4 March 27th 08 11:04 AM
Formatting a cell to utilize list and auto populate Amy Mucke Excel Worksheet Functions 0 March 18th 08 07:43 PM
Auto-Filter within a Macro jeannie v Excel Discussion (Misc queries) 1 June 17th 07 10:59 AM
Auto Filter Macro Snakeoids Excel Discussion (Misc queries) 10 August 24th 05 08:46 PM
Auto Filter in a macro hawkeyes2002[_2_] Excel Programming 0 November 14th 03 11:41 PM


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

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

About Us

"It's about Microsoft Excel"