Search Cells for a Particular Word

juleskaynel

New Member
Joined
Mar 14, 2014
Messages
9
I am looking for an excel formula for the below:

If A1, or A2, or A3, or A4 contain the Letter Y, then add the word "YES" to cell A5.

A1 A2 A3 A4 A5
Y Y N N YES
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
You may use this if the cells don't have much text in them:

Code:
=IF(ISNUMBER(FIND("Y",C2,1)),"YES","")

Replace FIND with SEARCH if you do not want it to be case sensitive. If the cells have lots of characters, you may need to test each cell individually.
 
Upvote 0
Another possibility for the non-case sensitive formula...

=IF(COUNTIF(A1:A4,"Y"),"Yes","")
 
Upvote 0
I need to go to bed because the first post I made is useless... If a mod edited it, I wouldn't be offended. :)

Code:
=IF(ISNUMBER(FIND("Y",A1&A2&A3&A4,1)),"Yes","")
 
Upvote 0
Another try

=IF(COUNTIF(A1:A4,"Y")>=1,"Yes","")
That is the same formula I posted except that you added the unneeded test to see if the count is equal to or greater than 1 (try it without the direct test and you will see it still works).
 
Upvote 0

Forum statistics

Threads
1,214,994
Messages
6,122,633
Members
449,092
Latest member
bsb1122

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