Thanks:  0
Likes:  0

# Thread: IF? (so close yet so far)

1. Here is the formula my scatterbrained melon came up with:
=IF(((V17=0)*(N17>=1)),SUM(V17/SUM(N17-P17)),"No P2s")

It's not working, of course.

I would like for Y17 to check the value of V17 and N17. *IF* V = 0 AND N17 >=1, then I wish for v17/sum(N17-P17). If V17 = 0 AND N17< 1 then I would like it to return the text of "No P2s".

:: chomps on pencil ::

~Deirdre

2. Here's what you need, although all this will return is either the value 0 (as zero divided by anything is zero) or "No P2s".

=IF(AND(V17=0,N17>=1),V17/SUM(N17-P17),"No P2s")

A simpler formula would be:
=IF(V17=0,0,"No P2s")

Hope this helps!

3. Try the code below:
=IF(V17=0,IF(N17>=1,V17/SUM(N17-P17),"No P2s"),"")

You did not specify what you want if v17 does equal 0. You can put any text inside the "" that you want displayed.

I hope this helps.
Kind regards, Al

4. try

=IF(AND(V17=0,N17>=1),V17/(N17-P17),"No P2s")

but this will yield 0 since V17=0

so
=IF(AND(V17=0,N17>=1),0,"No P2s")

Did I read something incorrectly or is
some information missing?

5. On 2002-03-14 10:54, Deirdre wrote:
Here is the formula my scatterbrained melon came up with:
=IF(((V17=0)*(N17>=1)),SUM(V17/SUM(N17-P17)),"No P2s")

It's not working, of course.

I would like for Y17 to check the value of V17 and N17. *IF* V = 0 AND N17 >=1, then I wish for v17/sum(N17-P17). If V17 = 0 AND N17< 1 then I would like it to return the text of "No P2s".

:: chomps on pencil ::

~Deirdre
Almost there...

=IF((V17=0)*(N17>=1),V17/(N17-P17),"No P2s")

This will return "No P2s" when V17 is not zero and N17 is less than 1.

6.

7. Thank you everyone for your inout and time. I tried them all and still not getting to what I want. Let me try to illustrate, I could very well be doing this the difficult way...

In retrospect, I see I failed to fully explain my dilema. Please accept my apologies.

N17 = 7
V17 = 4
When this occurs, I would like v17/(N17-P17).

N17 = 7
V17 = 0
When this occurs, I would like for it to return "No P2s"

N17 = 0
V17 = 0
When this occurs, I would like for it to return blank or 0 (doesn't matter)

8. Are these the only possible values for V17 and N17?

9. Are these the only possible values for V17 and N17?
No

10. Then are these the only values you are interested in looking at? what do want when N17 is greater than 7? When N17 is between 7 and 0? When n17 is less than 0? You need to provide more info please if you want a workable solution.

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•