Personal computing discussed

Moderators: renee, SecretSquirrel, just brew it!

 
Justice
Gerbil Elite
Topic Author
Posts: 989
Joined: Fri Apr 23, 2004 1:30 am
Location: Phoenix, AZ (AKA Hell)
Contact:

Need Help With Excel Formula; IF and NULL

Fri Aug 06, 2010 2:40 pm

So I'm trying to run a formula that checks to see if a cell has data or not (value or null), and if it's empty it leaves the totals cell empty as well (Null). But if it has a value, it then SUMs all the needed cells.

Image

Now, I have a few products that are SUM'd anyway, those would be the green colored products. That's a simple SUM formula. But the red colored products only matter if there are actual on hand quantites [# of units]. I had written an IF formula but it keeps erroring and I'm not sure what to do to make it work.

B2
=if(C2,null),,SUM(C2:E2)

I've tried the following with no success.
=if(C2,null),null,SUM(C2:E2)
=if(C2,null),#null,SUM(C2:E2)


Thank you for any help you can provide.
|FN|Steel wrote:
Millions of sheep doesn't make [Censored] right.
 
Justice
Gerbil Elite
Topic Author
Posts: 989
Joined: Fri Apr 23, 2004 1:30 am
Location: Phoenix, AZ (AKA Hell)
Contact:

Re: Need Help With Excel Formula; IF and NULL

Fri Aug 06, 2010 2:47 pm

Figures... I post the question then figure it out.

I got it working with this:

=if(C2=0,"",SUM(C2:E2))
|FN|Steel wrote:
Millions of sheep doesn't make [Censored] right.
 
JustAnEngineer
Gerbil God
Posts: 19673
Joined: Sat Jan 26, 2002 7:00 pm
Location: The Heart of Dixie

Re: Need Help With Excel Formula; IF and NULL

Fri Aug 06, 2010 6:35 pm

How about this?

=IF(ISNUMBER(C2),SUM(C2:E2),"")

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On