#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default 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"
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 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"



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default 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"

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF question CSUS_CE_Student[_2_] Excel Worksheet Functions 1 April 6th 07 07:55 AM
if question Jules Excel Worksheet Functions 3 August 10th 06 08:34 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
New Question Greegan Excel Worksheet Functions 0 August 4th 05 01:24 AM


All times are GMT +1. The time now is 03:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"