Foo - SEARCH function in Excel.

Bikeforums.net is a forum about nothing but bikes. Our community can help you find information about hard-to-find and localized information like bicycle tours, specialties like where in your area to have your recumbent bike serviced, or what are the best bicycle tires and seats for the activities you use your bike for.




View Full Version : SEARCH function in Excel.


phantomcow2
06-28-10, 09:50 AM
I'm trying to use the search function to search for two strings in text. That is, I have a spreadsheet whose "L" column is populated with short phrases, like "I ate a rotten orange and mango today." It could be anything. The point is I want to use the SEARCH function to find entries that mention mango OR orange. I thought I'd use something like
=SEARCH(OR("mango", "orange")$L$1:$L$250) but it isn't working. How can I adapt the SEARCH function to search for multiple strings?


jccaclimber
06-28-10, 10:36 AM
I'm sure there's a better way, but you could search for 'mango', then 'orange', and sum the results. What is your desired output format?

ModoVincere
06-28-10, 10:37 AM
Try the = Find(find_text,within_text,start_num) function.


TexasGuy
06-28-10, 10:37 AM
I don't think the search function is designed to search a range. I think this is the job of a macro.

jsharr
06-28-10, 10:38 AM
I would just shove a fruit bat into the CD rom drive.

TexasGuy
06-28-10, 10:39 AM
Try the = Find(find_text,within_text,start_num) function.

Find is has the same declaration as Search pretty much.
I don't believe that within_text is allowed to be a range.
It's supposed to be either a string value or a single cellreference. the 3rd parameter is the indexto start looking for the pattern after.

phantomcow2
06-28-10, 10:42 AM
Find is the same thing as Search except that it's case sensitive. My desired output is to sort through the ~250 entires with mango or orange mentioned and produce a new column indicating where this occurs.

TexasGuy
06-28-10, 10:42 AM
http://support.microsoft.com/kb/282151
The macro Code in the 2nd box in (Workaround) section is similar to what you want.

this person wrote a FindAll VBA macro/function that is reusable.
http://www.cpearson.com/excel/FindAll.aspx

ModoVincere
06-28-10, 10:51 AM
Find is has the same declaration as Search pretty much.
I don't believe that within_text is allowed to be a range.
It's supposed to be either a string value or a single cellreference. the 3rd parameter is the indexto start looking for the pattern after.

this is correct. An easy way around this is to place the string to be looked for at the top of the column, and use absolute references or semi absolute references in order to search for multiple items. Filtering for results or even using a pivot table to summarize results.

Of course, if you know access and VBA, one can simply load sql results into a result set and then search those result sets.

apclassic9
06-28-10, 11:06 AM
try a combination formula like =Search("mango")AND("orange") - using whatever syntax excel uses. I use Lotus 123, where I would use a complex "IF" statement in a new column. That might work in excel.

bigbenaugust
06-28-10, 11:11 AM
I would just shove a fruit bat into the CD rom drive.

Kind of messy, don't you think? I'd open the case and put it in that way.

jsharr
06-28-10, 11:16 AM
Kind of messy, don't you think? I'd open the case and put it in that way.

I should have prefaced my post with the fact that I am not a techno geek. You can open the case? Really?

ModoVincere
06-28-10, 11:19 AM
Kind of messy, don't you think? I'd open the case and put it in that way.


I should have prefaced my post with the fact that I am not a techno geek. You can open the case? Really?


So, if its an apple, you're making fruit salad? where do the raisins go?

jsharr
06-28-10, 11:32 AM
You can run Excel on an apple? ON me, the raisins go straight through, so I am going to answer "toilet".

ModoVincere
06-28-10, 11:37 AM
Toilet, apple.....same thing.

bigbenaugust
06-28-10, 11:59 AM
I should have prefaced my post with the fact that I am not a techno geek. You can open the case? Really?

Yes, but do it carefully so as not to interrupt the gnomes working in there. Also, don't disconnect the tubes if you like Internet access.

But the real question is: Why is he looking for oranges and mangoes in his spreadsheet? They're at the store (or on a tree)!

Tude
06-28-10, 12:03 PM
try a combination formula like =Search("mango")AND("orange") - using whatever syntax excel uses. I use Lotus 123, where I would use a complex "IF" statement in a new column. That might work in excel.

That's what I was thinking - and IF statement.

jccaclimber
06-29-10, 06:59 AM
Toilet, apple.....same thing.
You know, one make much better pies than the other.

ModoVincere
06-29-10, 07:06 AM
You know, one make much better pies than the other.

mud pies.....apple pies......what's your point?