ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   One question (https://www.excelbanter.com/excel-discussion-misc-queries/146720-one-question.html)

omer

One question
 
If either column A has "yes" or column B has "yes", column C should show
"yes" too but if BOTH columns "A" or "B" have "N/A" "C" should say "N/A",

A B C
Yes no yes
No Yes Yes
Yes Yes Yes
No no No
N/A N/A N/A

I tried =IF(OR(a1="Yes",b1="Yes"),"Yes","No")
it is giving me

A B C
Yes no yes
No Yes Yes
Yes Yes Yes
No no No
N/A N/A no

C5 is the thing I want to change from "no" to "NA"

T. Valko

One question
 
Try one of these:

=IF(COUNTIF(A1:B1,"n/a")=2,"N/A",IF(COUNTIF(A1:B1,"yes"),"Yes","No"))

=IF(AND(A1="n/a",B1="n/a"),"N/A",IF(OR(A1="yes",B1="yes"),"Yes","No"))

Copy down as needed

Biff

"Omer" wrote in message
...
If either column A has "yes" or column B has "yes", column C should show
"yes" too but if BOTH columns "A" or "B" have "N/A" "C" should say "N/A",

A B C
Yes no yes
No Yes Yes
Yes Yes Yes
No no No
N/A N/A N/A

I tried =IF(OR(a1="Yes",b1="Yes"),"Yes","No")
it is giving me

A B C
Yes no yes
No Yes Yes
Yes Yes Yes
No no No
N/A N/A no

C5 is the thing I want to change from "no" to "NA"




omer

One question
 
an body please?



"Omer" wrote:

If either column A has "yes" or column B has "yes", column C should show
"yes" too but if BOTH columns "A" or "B" have "N/A" "C" should say "N/A",

A B C
Yes no yes
No Yes Yes
Yes Yes Yes
No no No
N/A N/A N/A

I tried =IF(OR(a1="Yes",b1="Yes"),"Yes","No")
it is giving me

A B C
Yes no yes
No Yes Yes
Yes Yes Yes
No no No
N/A N/A no

C5 is the thing I want to change from "no" to "NA"


Rick Rothstein \(MVP - VB\)

One question
 
If either column A has "yes" or column B has "yes", column C should show
"yes" too but if BOTH columns "A" or "B" have "N/A" "C" should say "N/A",

A B C
Yes no yes
No Yes Yes
Yes Yes Yes
No no No
N/A N/A N/A

I tried =IF(OR(a1="Yes",b1="Yes"),"Yes","No")
it is giving me

A B C
Yes no yes
No Yes Yes
Yes Yes Yes
No no No
N/A N/A no

C5 is the thing I want to change from "no" to "NA"


Your question is a follow up to one you asked in an earlier thread... it
would have been better to keep your question in that original thread.
Anyway, just so you are aware, the text string "N/A" is not the only problem
text... for the above formula that you tried (which is the one JE McGimpsey
posted in that earlier thread), any piece of text that is not the word "yes"
will cause a problem. Similarly, the formula I posted in that earlier thread
will cause problems whenever a piece of text that is not the word "no" is
used. You never mentioned if "yes" and "no" were the only possible entries,
but your example suggested it was, so we provided answers to match that. If
you have **other** conditions that you need to account for, you should
mention them in your question when you first ask it... that would save you
the time and trouble of having to come back here like you did in this
thread. So... are there any other conditions you need to account for?

Rick


Don Guillett

One question
 
If you want help here, you need to ask questions with a meaningful subject
line and stay in the original thread and show a bit of patience.

--
Don Guillett
SalesAid Software

"Omer" wrote in message
...
If either column A has "yes" or column B has "yes", column C should show
"yes" too but if BOTH columns "A" or "B" have "N/A" "C" should say "N/A",

A B C
Yes no yes
No Yes Yes
Yes Yes Yes
No no No
N/A N/A N/A

I tried =IF(OR(a1="Yes",b1="Yes"),"Yes","No")
it is giving me

A B C
Yes no yes
No Yes Yes
Yes Yes Yes
No no No
N/A N/A no

C5 is the thing I want to change from "no" to "NA"




All times are GMT +1. The time now is 12:35 AM.

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