• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

find set of words in sentence

trprasad78

Member
Hi

i have sent of words in sheet2 , sheet1 i have sentence.

In a sentence any word found it has to say YES or NO.

please suggest me.

Thank you
 

Attachments

  • sample.xls
    23.5 KB · Views: 15
Hi Prasad, Good day and welcome to the forum.

Please try this in B2 and copy down:

=IF(ISERROR(LOOKUP(9^9,SEARCH('lookup Value'!$A$2:$A$6,A2))), "No","Yes")

Regards,
Thank you so much Mr. Khalid NGO,

Its working fine.

I never used lookup function. I would like to know what 9^9 why we used this.
i know vlookup and hlookup.

can you please explain why we need to use 9^9.

Thank you
 
@trprasad78

Here's the explanation of Khalid's formula.
=IF(ISERROR(LOOKUP(9^9,SEARCH('lookup Value'!$A$2:$A$6,A2))), "No","Yes")

SEARCH(Find_String,Lookup_String) This portion returns numeric value if it finds Find_String within Lookup_String.

LOOKUP(9^9,SEARCH()), then exploits how LOOKUP function works.
LOOKUP finds greatest value in Range (SEARCH() in this case) without exceeding Lookup value (9^9).

Since 9^9 evaluates to 387,420,489. Due to Excel string length limitation, there is no possibility of numeric SEARCH() result exceeding that value and will resolve every time as long as Find_String is found.

Edit: Also it's important to note that SEARCH() by itself cannot deal with array of Find_String. It is for this reason Khalid nested it in LOOKUP and I used SUMPRODUCT(--ISNUMBER()).
 
Last edited:
Dear trprasd78

since your all the lookup value is the first instance of your Raw data

here is my contribution in thi scase..
Pls complete the formula with CTRL+SHIFT+ENTER

=IF(ISNUMBER(MATCH(1,SEARCH($D$1:$D$6,A2),0)),"yes","no")

regards
Naresh
 
Guys , I am trying to do something similar.But going further can we know which value from the lookup it matched ?? instead of simple yes & No
 
Back
Top