Find value between quotation mark in a cell

olympiac

Board Regular
Joined
Sep 26, 2010
Messages
158
Scenario:

If the sentence between quotation mark in "cell $A$1" is contained in the sentence between quotation mark in "cell B1" then display in "cell C1" the value "Yes" otherwise display the value "No"
Eg:
A1: "software code32"
B1: "software code32" "RMR software" "QWER system"
C1: Yes

or
A1: "software code32" "RMR software"
B1: "software code32"
C1: Yes


PS: I can change the quotation mark with anything else if it's necessary
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I tried your formula but it doesn't work properly. See scenario below where the result is cell C1 is "No" while the value ""QWER system" is in Cell B1 and as a result should give "Yes" in cell C1

A1: "new value" "QWER system"
B1: "software code32" "RMR software" "QWER system"
C1: No

Any idea?
 
Upvote 0
That's because it's looking for the entirety of A1 in cell B1.
If you're looking for a fuzzy lookup (i.e. part of a cell in another cell), you'll probably need code of some sort.
 
Upvote 0
Scenario:

If the sentence between quotation mark in "cell $A$1" is contained in the sentence between quotation mark in "cell B1" then display in "cell C1" the value "Yes" otherwise display the value "No"
Eg:
A1: "software code32"
B1: "software code32" "RMR software" "QWER system"
C1: Yes

or
A1: "software code32" "RMR software"
B1: "software code32"
C1: Yes


PS: I can change the quotation mark with anything else if it's necessary
Try...

=IF(ISNUMBER(LOOKUP(9.999999999999999E+307,CHOOSE({1,2},SEARCH(A1,B1),SEARCH(B1,A1)))),"Yes","No")
 
Upvote 0
Hi Aladin - can you explain that one in stages please?

In

=IF(ISNUMBER(LOOKUP(9.999999999999999E+307,CHOOSE({1,2},SEARCH(A1,B1),SEARCH(B1,A1)))),"Yes","No")

A) SEARCH returns a position indicating integer.

SEARCH("JAD","KAD JAD") would give" 5.

SEARCH("KAD JAD","JAD") would give #VALUE!.

B) CHOOSE({1,2},Expression1,Expression2)

yields an array that consists of two evaluations. So:

CHOOSE({1,2},SEARCH("JAD","KAD JAD"),SEARCH("KAD JAD","JAD"))

yields:

{5,#VALUE!}

C) LOOKUP with 9.99999999999999E+307 as look up value returns the last numeric value if that exists from a reference it's given. Thus:

LOOKUP(9.99999999999999E+307,CHOOSE({1,2},SEARCH("JAD","KAD JAD"),SEARCH("KAD JAD","JAD")))

==>

LOOKUP(9.99999999999999E+307,{5,#VALUE!})

==>

5

D) ISNUMBER tests whether LOOKUP turns up a number. IF maps the test result onto Yes/No.

Hope this helps.

Note. For 9.99999999999999E+307 (or 9.99E+307 if so desired), see:

http://www.mrexcel.com/forum/showthread.php?t=102091

http://www.mrexcel.com/forum/showthread.php?t=310278 (post #7)
 
Upvote 0
Thanks for that.
So by the looks of it, you can add as many options as you want to choose.
Is that right?
 
Upvote 0
Hi

Still not clear to me. With your last example it seems that if any of the sentences in quotation marks in A1 are present in B1, then you want Yes.

For ex:

A1: "a" "b" "c" "d"
B1: "e" "c" "f"

You want Yes because "c" (one of the sentences in quotation marks in A1) is also present in B1.

Is this correct?
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,553
Members
452,928
Latest member
101blockchains

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