MS Excel

Posted on 2014-09-29
Last Modified: 2014-09-30
Can someone please help me.  I'm using autosum and it always populates the cells with a 0 if there is no info to add.  OK, but I don't want the zeros, I want to adjust the formula so that if there is nothing to add at this time, don't put anything.  Can this be accomplished?
Question by:jakester69
  • 4
  • 3
LVL 12

Accepted Solution

tel2 earned 250 total points
ID: 40351123
Hi Jake,

I can think of two easy options.  Either:
1. Change the sum formula to be something like:
2. Change the format of the sum cell to a Custom format something like:

The latter is probably more tidy/simple/efficient, but may need work to get the format right, e.g. if you are not working with integers only.

Edit: Having reviewed your question, I'm not sure whether this is what you want.  This simply works on the total of the figures, and if that is 0 then it displays nothing.  If you're adding things like 5 and -5, then you will have something to add, but the total will show as nothing.  Is that what you want, Jake?
If all your figures must be blank or positive, then I don't think it matters.
LVL 27

Assisted Solution

by:Glenn Ray
Glenn Ray earned 250 total points
ID: 40351222
It's important to draw the distinction between having nothing to add and having a number of values that total zero.

If you have data in a range - say A2:A100 - that you want to only display the total of IF there are values in that range then:

This will produce a result of zero (0) if there is even one zero in the range.  But if the range is empty, the formula will return a blank.

LVL 12

Expert Comment

ID: 40351263
> "It's important to draw the distinction between having nothing to add and having a number of values that total zero."
True, Glenn, and that is a distinction that I drew in the last part of my post.  I had assumed something which was not quite what was asked for, but might do the job or might be what is wanted.  Your solution looks good, and should do exactly what was asked for.
LVL 27

Expert Comment

by:Glenn Ray
ID: 40351388
Cool.  Let me know if you have any issues with this logic or formula.

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

LVL 12

Expert Comment

ID: 40351400
Are you talking to me, Glenn?  You realise I'm not the asker, right?
LVL 27

Expert Comment

by:Glenn Ray
ID: 40351445
Are you talking to me, Glenn?  You realise I'm not the asker, right?

And that's the last time I try to answer a question after a glass of The Macallan. :-)
LVL 12

Expert Comment

ID: 40351454
Well they do say don't drink and drive.  I'm now guessing that includes driving computers.

Author Closing Comment

ID: 40352029
Thanks guys, Both solutions work equally well so I felt both answers should acknowledged.
I was referring to cells with no value (blank) and positive #s but it's good to know there is a difference and I will refer  back to this in the future.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel conversion issue with Sql server 14 45
Match formula returns N/A 5 25
increment numbers by 10 11 26
Manually enter date in datepicker 24 27
Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now