HUGE problems with detecting multiple text strings a single cell

BillTony

Board Regular
Joined
May 3, 2017
Messages
70
I am trying to find a method in which to detect 2 separate Text Strings within a given cell.

In a nutshell - user input on a form I have is not always what it could be.

So, if the expected answer would be "No Luck," some users will invariably enter "No Luck."

Unfortunately, according to the specifications I have been supplied, the latter is "acceptable..."

Below I'm including 2 snippets that work perfectly well independently of each other - the issue I am having is how to COMBINE them into a single statement (with AND somehow?).

I've tried quite a number of variations so far, but haven't come up with anything usable!

Thanks in advance!

Code:
=IF(ISNUMBER(SEARCH("No",A1)),"Text String Found","Not present")

=IF(ISNUMBER(SEARCH("Luck",A1)),"Text String Found","Not present")
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Sorry, the 2nd "No Luck" in the example had several spaces between the 2 words - I guess the forum logic "proof-read" them out...

Thanks again!
 
Upvote 0
How about
=IF(AND(ISNUMBER(SEARCH("No",A1)),ISNUMBER(SEARCH("Luck",A1))),"Text String Found","Not present")
 
Upvote 0
Hi,

This could also work:


Book1
ABC
1no luck Text String Found
Sheet92
Cell Formulas
RangeFormula
C1=IF(ISNUMBER(SEARCH("*No*Luck*",A1)),"Text String Found","Not Present")
 
Upvote 0
Thanks to you BOTH for such timely responses to a thorny issue - I will give it a shot as soon as I return to the office!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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