ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Yes or No for adjacent cells (https://www.excelbanter.com/excel-worksheet-functions/160584-yes-no-adjacent-cells.html)

JKWParrott

Yes or No for adjacent cells
 
I want cell N8 to display "Yes" if any cell between B8 and M8 have a "Y" in
them. I have tried the array {=IF(B8:M8="Y","Yes","No")} but it only reads
the first cell and disregards any "Y" in any other cell. If the cels have "N"
in them then N8 can remain empty.
Any ideas?

JNW

Yes or No for adjacent cells
 
Try...
{=IF(Or(B8:M8="Y"),"Yes","No")}
--
JNW


"JKWParrott" wrote:

I want cell N8 to display "Yes" if any cell between B8 and M8 have a "Y" in
them. I have tried the array {=IF(B8:M8="Y","Yes","No")} but it only reads
the first cell and disregards any "Y" in any other cell. If the cels have "N"
in them then N8 can remain empty.
Any ideas?


JKWParrott

Yes or No for adjacent cells
 
Thanks, worked like a charm.

"JNW" wrote:

Try...
{=IF(Or(B8:M8="Y"),"Yes","No")}
--
JNW


"JKWParrott" wrote:

I want cell N8 to display "Yes" if any cell between B8 and M8 have a "Y" in
them. I have tried the array {=IF(B8:M8="Y","Yes","No")} but it only reads
the first cell and disregards any "Y" in any other cell. If the cels have "N"
in them then N8 can remain empty.
Any ideas?


Dave Peterson

Yes or No for adjacent cells
 
=if(countif(b8:m8,"y")0,"yes","no")

or if you want the cell to look blank:

=if(countif(b8:m8,"y")0,"yes","")



JKWParrott wrote:

I want cell N8 to display "Yes" if any cell between B8 and M8 have a "Y" in
them. I have tried the array {=IF(B8:M8="Y","Yes","No")} but it only reads
the first cell and disregards any "Y" in any other cell. If the cels have "N"
in them then N8 can remain empty.
Any ideas?


--

Dave Peterson


All times are GMT +1. The time now is 09:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com