Formula that if the cell contains any "Yes" pull the word to the left of it (it may have multiple yes')

squeakums

Well-known Member
Joined
May 15, 2007
Messages
839
Office Version
  1. 365
For Cell F2 if it contain the word Yes, pull the word to the left of yes. Is this something that can be written. It may have multiple yes fields.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
It is not quite clear to me exactly what you are looking for and where exactly you want it to go (and I suspect others may have the same questions too, since no one has replied yet).
Can you show us an example of your data and expected output?
 
Upvote 0
It is not quite clear to me exactly what you are looking for and where exactly you want it to go (and I suspect others may have the same questions too, since no one has replied yet).
Can you show us an example of your data and expected output?
Something like this, the formula would be in the if yes field.

Questions AnsweredIf Yes
Cats Yes, Dogs No, Parrot Yes, Fish Yes, Lizards NoCat, Parrots, Fish
 
Upvote 0
When you said "multiple yes" entries were possible, I thought you meant in individual/different cells, not multiple entries like that in the same cell.
That makes things much harder.

I would have to use VBA on something like this. There are some formula wizards on this site who can probably do it without VBA, but it is a little beyond my skill level.
 
Upvote 0
How about
Fluff.xlsm
AB
1
2Cats Yes, Dogs No, Parrot Yes, Fish Yes, Lizards NoCats, Parrot, Fish
Sheet4
Cell Formulas
RangeFormula
B2B2=LET(a,TEXTSPLIT(A2," ",", "),TEXTJOIN(", ",,FILTER(INDEX(a,,1),INDEX(a,,2)="yes")))
Fluff sorry I didn't realize you replied on this. I appreciate it. It doesn't seem to work with my layout it has a calc error. Here is an example of my layout.

1730901597992.png
 
Upvote 0
That's because the data in the image, is completely different from the data you posted in post#3
Please post some accurate data.
 
Upvote 0
Can you post a few samples of that data, preferably using the XL2BB add-in.
 
Upvote 0
Can you post a few samples of that data, preferably using the XL2BB add-in.
My work PC wouldn't allow me to install that unfortunately, I will need to recreate this at home and send it. I wish they allowed us to post excel docs still.
 
Upvote 0

Forum statistics

Threads
1,223,579
Messages
6,173,170
Members
452,504
Latest member
frankkeith2233

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