formula to check if the first 25 charatures of a cell contain "Yes", "No", "Maybe"

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,195
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,
hope someone can help with this really stuck,
I need a formula that can tell me if cell "I10" contains either the word "Yes","No","Maybe" or none.

now the problem i'm having is this,
it can't be case sensitive so no, No,NO,nO all = "No"
and it needs to be just that word, so "Not Sure" for example is triggering as "No" the way i tried to do it,
But we can't just do "no" with a space in front or behind because it could be the first or last word in the cell???

So how can i have a formula that will tell me which word it finds if any?

so the results should be
"Yes"
"No"
"Maybe"
"Nothing found"


I'm really stuck and don't want to have to work the weekend so any help anyone can give would be great
Thanks

Tony
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Thanks for posting on the forum.
Try the following.

Order from least important to most important if the cell has more than one answer.

Dante Amor
AIJ
1
9
10contains yesYes
11contains NoNo
12No Maybe contains yes and noYes
13maybeMaybe
14some NO word maybeNo
15nothingNothing found
Hoja5
Cell Formulas
RangeFormula
J10:J15J10=IFERROR(LOOKUP(2,1/(SEARCH({" maybe ";" no ";" yes "}," " &I10 & " ")),{"Maybe";"No";"Yes"}),"Nothing found")



Let me know the result and I'll get back to you as soon as I can.
Sincerely
Dante Amor

----- --
 
Upvote 0
I missed the following:

formula to check if the first 25 charatures of a cell contain "Yes", "No", "Maybe"

It was necessary to review the first 25 characters in the formula, so it would be like this:

Rich (BB code):
=IFERROR(LOOKUP(2,1/(SEARCH({" maybe ";" no ";" yes "}," " &LEFT(I10,25) & " ")),{"Maybe";"No";"Yes"}),"Nothing found")
 
Upvote 0
Thanks Dante,
I had worked that part out, but thanks for confirming i did it correctly :)
Tony
 
Upvote 1

Forum statistics

Threads
1,215,474
Messages
6,125,026
Members
449,204
Latest member
LKN2GO

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