ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using the IF fuction for multiple cells (https://www.excelbanter.com/excel-worksheet-functions/226619-using-if-fuction-multiple-cells.html)

Mike

Using the IF fuction for multiple cells
 
Can anyone help me correctly write an IF function for multiple cells? Here is
an example of what I am needing help with:

A2, B2, C2, D2 are all yes or no responses. I need a formula that will tell
me if anyone of these cells is "yes" then the outcome is yes.

In an individual cell my formula is =IF(A2="Yes","Yes","")...this works fine
but I need to expand to capture all cells.

T. Valko

Using the IF fuction for multiple cells
 
Try this:

=IF(COUNTIF(A2:D2,"Yes"),"Yes","")

--
Biff
Microsoft Excel MVP


"Mike" wrote in message
...
Can anyone help me correctly write an IF function for multiple cells? Here
is
an example of what I am needing help with:

A2, B2, C2, D2 are all yes or no responses. I need a formula that will
tell
me if anyone of these cells is "yes" then the outcome is yes.

In an individual cell my formula is =IF(A2="Yes","Yes","")...this works
fine
but I need to expand to capture all cells.




Mike

Using the IF fuction for multiple cells
 
Thanks works perfectly!!!!

Mike

"T. Valko" wrote:

Try this:

=IF(COUNTIF(A2:D2,"Yes"),"Yes","")

--
Biff
Microsoft Excel MVP


"Mike" wrote in message
...
Can anyone help me correctly write an IF function for multiple cells? Here
is
an example of what I am needing help with:

A2, B2, C2, D2 are all yes or no responses. I need a formula that will
tell
me if anyone of these cells is "yes" then the outcome is yes.

In an individual cell my formula is =IF(A2="Yes","Yes","")...this works
fine
but I need to expand to capture all cells.





Roger Govier[_7_]

Using the IF fuction for multiple cells
 

Hi Mike

=IF(COUNTIF(A2:D2)0,"Yes","No")

Strictly speaking the 0 isn't necessary, and it could be written as
=IF(COUNTIF(A2:D2),"Yes","No")

Make the final part "" if you want nothing to show in the cell instaed
of "no"


--
Roger Govier
------------------------------------------------------------------------
Roger Govier's Profile: http://www.thecodecage.com/forumz/member.php?userid=81
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=82572


T. Valko

Using the IF fuction for multiple cells
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Mike" wrote in message
...
Thanks works perfectly!!!!

Mike

"T. Valko" wrote:

Try this:

=IF(COUNTIF(A2:D2,"Yes"),"Yes","")

--
Biff
Microsoft Excel MVP


"Mike" wrote in message
...
Can anyone help me correctly write an IF function for multiple cells?
Here
is
an example of what I am needing help with:

A2, B2, C2, D2 are all yes or no responses. I need a formula that will
tell
me if anyone of these cells is "yes" then the outcome is yes.

In an individual cell my formula is =IF(A2="Yes","Yes","")...this works
fine
but I need to expand to capture all cells.








All times are GMT +1. The time now is 11:18 AM.

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