Using an array as "find_text" in a FIND formula / or kind of a reverse VLOOKUP

koledgegirl

New Member
Joined
Jan 6, 2010
Messages
8
This seems theoretically simple but I can't wrap my head around it:

In A1 I have a text string, ie "Hello World!"
I want to find "World" within the text string, as part of an IF(ISERROR...) formula:
= IF(ISERROR(FIND("World", A1),"","Hooray!")

Now, I want to find EITHER "Hello" or "World", the way I would do it is by nesting:
=IF(ISERROR(FIND("Hello",A1)),IF(ISERROR(FIND("World",A1)),"","Hooray!"),"Hooray!")

Now, I have a full database with various phrases in column A and a list of select words such as "Hello", "World", etc = "List". I want to search for ANY ONE OF THE words on the List in each database entry. If my List is 7 words or less, I can continue nesting, but what do I do when it's longer?
It seems that there's some sort of an array usage that needs to happen here, but I am just guessing... and of course I tried but it doesn't work.

Any thoughts???
:confused: :confused: :confused:
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try this array formula

=IF(SUM(IF((ISNUMBER(SEARCH($M$1:$M$5,A1))*($M$1:$M$5<>"")),1))>0,"Hooray","")

After typing the formula, confirm with Ctrl-Shift-Enter, not just Enter.
 
Upvote 0
Try...

=IF(OR(ISNUMBER(FIND({"Hello","World"},A1))),"Hooray","")

or

=IF(OR(ISNUMBER(FIND(List,A1))),"Hooray","")

Note that the second formula needs to be confirmed with CONTROL+SHIFT+ENTER.
 
Upvote 0
ahhh YES! Thank you!!!
I love MrExcel forums :biggrin:

also I just found another way, slightly less direct, but the idea is the same:

{=IF(SUM(COUNTIF(A1,List))>0,"Hooray!","")}
Where the list would consist of "*Hello*", "*World*", etc
 
Upvote 0
Is there a way to do this and find out which value in the list matched? Kind of like a FIND or a SEARCH function but using many text strings to search within the single lookup value?

I am trying to lookup the state (list of long state names) from a cell with a bunch of other info, e.g.:

"Northern Arizona $72 s/f", "California Condo", "Bulk Washington District of Columbia"

The text doesn't have a fixed position nor a leading character.

Assistance greatly appreciated! ~W
 
Upvote 0
"Northern Arizona $72 s/f", "California Condo", "Bulk Washington District of Columbia"

Are these three separate strings, in three separate cells? If so, assuming that A2 contains the text string Califronia Condo, let J2:J53 contain the list of state names, then try...

=LOOKUP(9.99999999999999E+307,FIND(" "&$J$2:$J$53&" "," "&A2&" "),$J$2:$J$53)

Note that FIND is case-sensitive. If you don't want the formula to be case-sensitive, replace FIND with SEARCH.
 
Upvote 0
It works brilliantly, thank you so much!! I now have to study the formula to see if I can understand why.

Great assistance, very much appreciated, thanks again!! ~L
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,122
Members
452,381
Latest member
Nova88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top