Formula Help Please

P

Paul Black

Good morning,

I am having a bit of trouble with this formula.. Would I would like
is ...

If G8=0 AND If E9=0 put "" BUT

If G8=0 and If E9=0 and If F9>0 then SUM(E9:F9

Thanks in advance.

Regards,
Paul
 
A

AB

There are some scenarios that you haven't catered for but you can try
this:
=IF(AND(G8=0,E9=0),IF(F9>0,SUM(E9:F9),""))
 
R

Ron Rosenfeld

Good morning,

I am having a bit of trouble with this formula.. Would I would like
is ...

If G8=0 AND If E9=0 put "" BUT

If G8=0 and If E9=0 and If F9>0 then SUM(E9:F9

Thanks in advance.

Regards,
Paul

The trouble may come for your logic.

In an IF statement, the first part that is TRUE will be executed.

So a literal translation of your IF statement would always evaluate to "" since both your tests start out with testing G8 and E9 for equality to zero; you'll never get to the second test.

Perhaps AB's formula is what you really mean (testing your 2nd statement first), but if not, you need to clarify your logic. Also, note that your second statement can be simplified to
If G8=0 and If E9=0 and If F9>0 then F9 (since E9 is already = 0, SUM(E9:F9) is the same as F9).
 

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