# If second word x or y then true or else false

#### makinmomb

##### Active Member
 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
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

#### makinmomb

##### Active Member
Yes peter thanks , seems I don"t have to eat carrots

Thanks

#### Rick Rothstein

##### MrExcel MVP
Here is another formula that also seems to work...

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

#### Peter_SSs

##### MrExcel MVP, Moderator
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

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
Check Words

Last edited:

Replies
1
Views
453
Replies
3
Views
511
Replies
23
Views
5K
Replies
7
Views
670
Replies
18
Views
25K

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.

### Which adblocker are you using?

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

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