If second word x or y then true or else false

makinmomb

Active Member
Joined
Dec 23, 2013
Messages
401
DADO 20 X 20 = VULCI [ANTICA]
DADO DECOR 20 X 20 = VULCI [ANTICA]
DADO LISTELLO 4.5 X 20 = VULCI [ANTICA]

Assume the above on a1 to a3

Formula on b1 to to plug y if second word
on stock description is DECOR or LISTELLO

expected result , though I need it to leave
blank in place of N

N
Y
Y






<colgroup><col></colgroup><tbody>
</tbody>
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
59,294
Office Version
  1. 365
Platform
  1. Windows
Try this formula, copied down.

Excel Workbook
AB
1DADO 20 X 20 = VULCI [ANTICA] 
2DADO DECOR 20 X 20 = VULCI [ANTICA]Y
3DADO LISTELLO 4.5 X 20 = VULCI [ANTICA]Y
Check Words
 
Upvote 0

makinmomb

Active Member
Joined
Dec 23, 2013
Messages
401
Yes peter thanks , seems I don"t have to eat carrots
in compensating reading instead the formula will do the work

Thanks
 
Upvote 0

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
38,150
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Here is another formula that also seems to work...

=IF(OR(LEFT(MID(A1,FIND(" ",A1&" ")+1,9),{6,9})={"DECOR ","LISTELLO "}),"Y","N")
 
Upvote 0

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
59,294
Office Version
  1. 365
Platform
  1. Windows
Here is another formula that also seems to work...

=IF(OR(LEFT(MID(A1,FIND(" ",A1&" ")+1,9),{6,9})={"DECOR ","LISTELLO "}),"Y","N")
Rick

A couple of comments.

1. If taking that kind of approach, which does reduce the number of function calls, there is no need for the LEFT function as the two different lengths can be built directly into the MID function instead.

2. Don't know if it is possible with the OP's data, but I've suggested another slight modification to cope in case row 5 is possible.

So, my modified version of this, and also noting the OPs request regarding the 'N' results ...
expected result , though I need it to leave
blank in place of N


N
Y
Y
... becomes as shown in C2 below.

Excel Workbook
ABC
1RickPeter
2DADO 20 X 20 = VULCI [ANTICA]N 
3DADO DECOR 20 X 20 = VULCI [ANTICA]YY
4DADO LISTELLO 4.5 X 20 = VULCI [ANTICA]YY
5DADO LISTELLONY
Check Words
 
Last edited:
Upvote 0

Forum statistics

Threads
1,191,117
Messages
5,984,743
Members
439,906
Latest member
Sekiro1899

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
Top