Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Creating a "Search All" function

Hi there -

I have a little problem here and I was wondering if anyone could help
me out with this. I've created a database and already set up advanced
search macros. It selects a certain column and user can enter a string
to perform the search.

But, I was also wondering if anyone know a way where I can also have a
search where I can search a key word in all columns.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Creating a "Search All" function

Hi Tammy,

Try turning on the macro recorder while you perform the operation manually.

This should provide you with code which can be adapted and incorporated into
your existing code.


---
Regards,
Norman



"Tammy" wrote in message
oups.com...
Hi there -

I have a little problem here and I was wondering if anyone could help
me out with this. I've created a database and already set up advanced
search macros. It selects a certain column and user can enter a string
to perform the search.

But, I was also wondering if anyone know a way where I can also have a
search where I can search a key word in all columns.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Creating a "Search All" function

I'm sorry I don't understand.....

I've recorded some macro's such as refreshing the advanced filter,
where it will "show all" and delete the user inputs in the fields. But
the type of search I'm trying to do is for example...I want to search
for the word "alteration" in columns a, b, c, and d and list the rows
that contain "alteration" in either one of those columns.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Creating a "Search All" function

Hi Tammy,

One way would be to use a helper column

Try putting the formula

=COUNTIF(A2:C2,"=alternative")0

in (say) D2 and copy down as far as you need. Then filter using the column D
criterion of TRUE.

If the process is to be automated, turn on the macro recorder while you
perform these steps.

If you need any assistance in editing the recorder code, post back with
details of the problems you experience.


--
Regards,
Norman


"Tammy" wrote in message
oups.com...
I'm sorry I don't understand.....

I've recorded some macro's such as refreshing the advanced filter,
where it will "show all" and delete the user inputs in the fields. But
the type of search I'm trying to do is for example...I want to search
for the word "alteration" in columns a, b, c, and d and list the rows
that contain "alteration" in either one of those columns.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Creating a "Search All" function

Just to Add to Norman's excellent advice,

Also look at the help example for the FindNext method in Excel VBA help

Whatever you anchor the find command with is the area that is searched

Cells.Find . . . searches all cells

Columns(A:D).Find . . . searches columns A to D

--
Regards,
Tom Ogilvy


"Norman Jones" wrote in message
...
Hi Tammy,

One way would be to use a helper column

Try putting the formula

=COUNTIF(A2:C2,"=alternative")0

in (say) D2 and copy down as far as you need. Then filter using the column

D
criterion of TRUE.

If the process is to be automated, turn on the macro recorder while you
perform these steps.

If you need any assistance in editing the recorder code, post back with
details of the problems you experience.


--
Regards,
Norman


"Tammy" wrote in message
oups.com...
I'm sorry I don't understand.....

I've recorded some macro's such as refreshing the advanced filter,
where it will "show all" and delete the user inputs in the fields. But
the type of search I'm trying to do is for example...I want to search
for the word "alteration" in columns a, b, c, and d and list the rows
that contain "alteration" in either one of those columns.





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
=IF(ISNUMBER(SEARCH("ELB",B2)),"Pipe") add more like "ELB" "FLG" MAHMOUD Excel Worksheet Functions 5 September 6th 09 06:04 PM
Creating an "If" Function with multiple "if"s SchizJoe Excel Worksheet Functions 3 April 6th 09 07:55 PM
=IF(ISERROR(SEARCH("insurance",A125,1)),"","*") cynichromantique Excel Worksheet Functions 9 September 25th 08 09:49 PM
Creating a search and "jump to" function Brisebear Excel Discussion (Misc queries) 3 August 21st 06 02:07 AM
Pointing search function to "This Drive"? Ed[_9_] Excel Programming 2 October 16th 03 07:05 PM


All times are GMT +1. The time now is 06:05 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"