MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Formula for Totals


Posted by Paulino on January 02, 2002 11:07 AM

Years ago, I used a formula to add a total that would only show the total if at least one value was entered in one of the cells. Otherwise, the cell would be blank. Is anyone know how to create that formula?


Posted by Rick E on January 02, 2002 11:19 AM

Try the IF function - see example...


Use the IF function, here is an example:

=IF(SUM(C7:C10)>0,SUM(C7:C10),"")

The above if in cell C11 would be "blank" unless the cells C7 to C10 had a number in them.

Rick E.

Posted by Aladin Akyurek on January 02, 2002 11:28 AM

Re: Try the IF function - see example...

Rick --

What happens if C7:C10 houses the following numbers:

{5;-2;-3} ?

See my reply on Paulino's second post above for another approach.

Regards,

Aladin

========


Posted by Scott on January 02, 2002 11:29 AM

=IF(COUNT(a1:a100)=0,"",SUM(a1:a100))

Posted by Rick E on January 02, 2002 11:36 AM

Your right, using Count in the IF function is better. (NT)