Using the IF fuction for multiple cells

M

Mike

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.
 
R

Roger Govier

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top