Return value of "YES" when range contains one cell that has data

B

Beth Dye

I have 5 columns, the first 4 containing lookup functions that return either #N/A or a value of N44255 XX X XXXX where X can be any combination of digits
In the 5th column, I want it to look at the first 4 columns. If ANY ONE of them contain "N" in the first place, I want it to return a YES in the 5th column, otherwise a NO. And truthfully, I just want the YES's to show. I don't care if it returns another #N/A

I have tried so many formulas and can get them to work for a single cell..and as soon as I try to look at the range, it fails

A1 A2 A3 A4 A
#N/A N44255 02 C 0001 #N/A #N/A RETURN A "YES
N44255 03 P 2156 #N/A #N/A #N/A RETURN A "YES
#N/A #N/A #N/A #N/A Return a NO
 
P

Peo Sjoblom

One way

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

--


No private emails please, for everyone's
benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom

Beth Dye said:
I have 5 columns, the first 4 containing lookup functions that return
either #N/A or a value of N44255 XX X XXXX where X can be any combination of
digits.
In the 5th column, I want it to look at the first 4 columns. If ANY ONE
of them contain "N" in the first place, I want it to return a YES in the 5th
column, otherwise a NO. And truthfully, I just want the YES's to show. I
don't care if it returns another #N/A.
I have tried so many formulas and can get them to work for a single
cell..and as soon as I try to look at the range, it fails.
A1 A2 A3 A4 A5
#N/A N44255 02 C 0001 #N/A #N/A RETURN A "YES"
N44255 03 P 2156 #N/A #N/A #N/A RETURN A "YES"
#N/A #N/A #N/A
#N/A Return a NO
 
B

Beth Dye

That worked perfectly. Thank you.

Peo Sjoblom said:
One way

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

--


No private emails please, for everyone's
benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom


either #N/A or a value of N44255 XX X XXXX where X can be any combination of
digits.
of them contain "N" in the first place, I want it to return a YES in the 5th
column, otherwise a NO. And truthfully, I just want the YES's to show. I
don't care if it returns another #N/A.
cell..and as soon as I try to look at the range, it fails.
#N/A Return a NO
 
P

Peo Sjoblom

Thanks for the feedback..

--
No private emails please, for everyone's
benefit keep the discussion in the newsgroup.


Regards,

Peo Sjoblom
 

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