Solved

MS Excel

Posted on 2014-09-29
8
140 Views
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?
0
Comment
Question by:jakester69
  • 4
  • 3
8 Comments
 
LVL 11

Accepted Solution

by:
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:
    =IF(SUM(A1:A5)=0,"",SUM(A1:A5))
OR
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.
0
 
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:
=IF(COUNT(A2:A100),SUM(A2:A100),"")

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.

Regards,
-Glenn
0
 
LVL 11

Expert Comment

by:tel2
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.
0
 
LVL 27

Expert Comment

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

-Glenn
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 11

Expert Comment

by:tel2
ID: 40351400
Are you talking to me, Glenn?  You realise I'm not the asker, right?
0
 
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. :-)
0
 
LVL 11

Expert Comment

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

Author Closing Comment

by:jakester69
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.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Meetings to discuss business process can waste time, and often do .  The meeting's dialog can get confusing when participants have different professional perspectives and backgrounds.  A jointly-developed process picture helps wade through the confu…
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

747 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

10 Experts available now in Live!

Get 1:1 Help Now