If Then Or Statement

N

nabanco

Hi,

I'm having a little problem figuring this one out. I'm trying to create a
statement in excel 2003 that would accomplish the below:

If A1="X", then return "complete"

If A1 is blank, then we need to return "Yes" if N1 equals "Bond" or "Other".
If N1 equals "Government", then we need to return "Yes" if V1 is greter than
7 OR W1 is greater than 1.

Thanks for any help you can provide, this one is way above me.
 
N

Niek Otten

What if A1 is not X and not is blank?
If N1 = "Government" and A1 not is blank, then...?
What if V1 not greater than 7 and W1 not greater than 1?

I probably missed a few.
Please specify *exactly* what the requirements are.

| Hi,
|
| I'm having a little problem figuring this one out. I'm trying to create a
| statement in excel 2003 that would accomplish the below:
|
| If A1="X", then return "complete"
|
| If A1 is blank, then we need to return "Yes" if N1 equals "Bond" or "Other".
| If N1 equals "Government", then we need to return "Yes" if V1 is greter than
| 7 OR W1 is greater than 1.

|
| Thanks for any help you can provide, this one is way above me.
|
 
R

Rick Rothstein \(MVP - VB\)

I'm not sure if this does what you want or not, so you will have to test it to see...

=IF(A1="X","Complete",IF(A1="",IF(OR(N1="Bond",N1="Other"),"Yes",IF(AND(N1="Government",OR(V1>7,W1>1)),"Yes","???"))))

Note there is a "???" at the end of the formula... you didn't state a return value for this fall through condition, so I used "???"... perhaps you simply want to return a blank for it (just use "" instead of "???" if that is the case).

Rick
 
N

nabanco

Good point.

If A1 is blank, then the other rules below should apply. In other words, we
are pivoting out only the answers that return "Yes". If they are blank or
"complete", we are not using them in our pivot table. Below is the current
statement we use, but the columns have changes somewhat if this helps.
=IF(A455="X","Complete",IF(AND(V455>=1,V455<=100),"YES",""))

If we need to place something there, then we could return "No" if the rules
do not apply

If V1 not greater than 7 and W1 not greater than 1 then return "No"

Is that clear as mud?
 
N

nabanco

Rick, thank you so much, that worked beautifully

Rick Rothstein (MVP - VB) said:
I'm not sure if this does what you want or not, so you will have to test it to see...

=IF(A1="X","Complete",IF(A1="",IF(OR(N1="Bond",N1="Other"),"Yes",IF(AND(N1="Government",OR(V1>7,W1>1)),"Yes","???"))))

Note there is a "???" at the end of the formula... you didn't state a return value for this fall through condition, so I used "???"... perhaps you simply want to return a blank for it (just use "" instead of "???" if that is the case).

Rick
 

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