Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-09-2015, 06:19 PM
Chuck_Ds Chuck_Ds is offline How to make Excel stop treating blank cells as zero Windows 7 32bit How to make Excel stop treating blank cells as zero Office 2007
Novice
How to make Excel stop treating blank cells as zero
 
Join Date: Jan 2015
Posts: 6
Chuck_Ds is on a distinguished road
Default How to make Excel stop treating blank cells as zero

How do I make Excel stop treating blank cells as zero? Check out the following grid and my explanation, please.



Beginning Cost.........FinalCost ...........Savings
194............................................... ............ 194
286 .................................................. .........286
367 ................................315 ...................52


........................................Total Savings: 532


Column A is the initial cost, while Column B is the lower cost that i've negotiated. As negotiations are done, I'm updating column B with the "final cost." Column C, "Savings," simply computes the difference between column A and column B. At the bottom of Column C, I have a cell to compute the total savings using a basic "Sum" function. The problem is I want to keep a running tally of how much we'ved saved thus far and the fact that Excel is treating the blank cells as zero means that it's giving me inaccurate data. It appears that we've saved $532, when we've really only saved $52 thus far. I update Column B (Ending Cost) as that data becomes available. I know this should be a basic thing to do, but I've looked everywhere and haven't found the answer. Thanks in advance for your help!

Last edited by Chuck_Ds; 01-09-2015 at 06:29 PM. Reason: Excel Grid didn't post
Reply With Quote
  #2  
Old 01-10-2015, 01:44 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline How to make Excel stop treating blank cells as zero Windows 7 64bit How to make Excel stop treating blank cells as zero Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,777
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi
it seems that the final cost column should contain the final cost. So, instead of an empty cell, B2 for instance should contain the same as A2 as long as you have no lower price. Savings would then correctly be 0
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 01-10-2015, 10:26 AM
Chuck_Ds Chuck_Ds is offline How to make Excel stop treating blank cells as zero Windows 7 32bit How to make Excel stop treating blank cells as zero Office 2007
Novice
How to make Excel stop treating blank cells as zero
 
Join Date: Jan 2015
Posts: 6
Chuck_Ds is on a distinguished road
Default

Thanks for replying, Pecoflyer. I phrased the scenario in a generic fashion for simplicity and brevity. In the real-world scenario (which is similar, but not identical to the one I portrayed), it wouldn't be feasible to put anything into Column B until we have received data back.

Quote:
Originally Posted by Pecoflyer View Post
Hi
it seems that the final cost column should contain the final cost. So, instead of an empty cell, B2 for instance should contain the same as A2 as long as you have no lower price. Savings would then correctly be 0
Reply With Quote
  #4  
Old 01-10-2015, 10:34 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline How to make Excel stop treating blank cells as zero Windows 7 64bit How to make Excel stop treating blank cells as zero Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,777
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

I see . Then try the following to extract the total savings :
Code:
=SUMPRODUCT(($B$1:$B$4<>"")*$C$1:$C$4)
Adapt the ranges to your needs
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #5  
Old 01-10-2015, 12:03 PM
Chuck_Ds Chuck_Ds is offline How to make Excel stop treating blank cells as zero Windows 7 32bit How to make Excel stop treating blank cells as zero Office 2007
Novice
How to make Excel stop treating blank cells as zero
 
Join Date: Jan 2015
Posts: 6
Chuck_Ds is on a distinguished road
Default

Thanks a million, Charlie!! It worked! Do you have a link that explains how and why this works? That way, I'll know how to apply it to other situations. I don't recall seeing many of those characters in any of the other formulas I tried while researching this. Maybe that's why none of them worked. This works perfectly, because when '0' is entered, I want it to do that calculation (which it does!) and it ignores the blank cells (which it should!).

How does it know to differentiate between 'blank' and zero?
Reply With Quote
  #6  
Old 01-10-2015, 12:44 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline How to make Excel stop treating blank cells as zero Windows 7 64bit How to make Excel stop treating blank cells as zero Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,777
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

You're welcome, but my name is not Charlie. Have a look at http://www.xldynamic.com/source/xld....T.html#classic
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #7  
Old 01-10-2015, 01:14 PM
Chuck_Ds Chuck_Ds is offline How to make Excel stop treating blank cells as zero Windows 7 32bit How to make Excel stop treating blank cells as zero Office 2007
Novice
How to make Excel stop treating blank cells as zero
 
Join Date: Jan 2015
Posts: 6
Chuck_Ds is on a distinguished road
Default

Thanks a million!! That help-sheet makes sense and drives the point home. Sorry about the name thing. I saw your "handle" that says "je suis Charlie" (I am Charlie) and figured that was your name. Yeah, I know it didn't say, "Je m'appelle Charlie" (my name is Charlie). I guess I was a few days out of the loop on that being a slogan related to recent international events. Thanks again for everything, Herbert...LOL... Just Kidding... Thanks, Pecoflyer...
Reply With Quote
  #8  
Old 01-12-2015, 02:32 PM
Chuck_Ds Chuck_Ds is offline How to make Excel stop treating blank cells as zero Windows 7 32bit How to make Excel stop treating blank cells as zero Office 2007
Novice
How to make Excel stop treating blank cells as zero
 
Join Date: Jan 2015
Posts: 6
Chuck_Ds is on a distinguished road
Default

Thanks for providing your assistance and the tutorial. Just to check for understanding, I'd like to explain what I think is happening. This function is giving a summation of all the values in my "Savings" column whenever the corresponding figure in the "Final Cost" column has a value that is not blank. And you were able to identify the non-blank cells by putting in the constraint that it has to be <>"" (which means greater than or less than blank - since there's nothing inside the quotes). Correct, or flawed? That was a crafty way to solve it. I was focused on a way to adjust the subtraction problem (Column A minus Column B), but you illuminated a different approach.

To test my understanding, I tried replicating it using the following formula, but it gives me an error. Any clue why?

=SUMIF(b2:b4,<>"", c2:c4)
Reply With Quote
  #9  
Old 01-12-2015, 05:10 PM
gebobs gebobs is offline How to make Excel stop treating blank cells as zero Windows 7 64bit How to make Excel stop treating blank cells as zero Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

What sumproduct does is give a sum of all the products of values in one range multiplied with those in another (or more even). For your example, it is effectively summing (0*194), (0*286), and (1*52).

Sumproduct is great at extracting data from a table based on multiple criteria. Say you have a table with EntryDate, Customer, Type, Amount and you want all the total amount of the records for 1/5/14 for XYZ Inc. that are credits:

=sumproduct(EntryDate=Datevalue("1/5/14")*(Customer="XYZ Corp.)*(Type="C"),(Amount))

Your equation will work if written as:

=SUMIF(b2:b4,">0", c2:c4)

The criteria has to be a string.
Reply With Quote
  #10  
Old 01-13-2015, 01:58 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline How to make Excel stop treating blank cells as zero Windows 7 64bit How to make Excel stop treating blank cells as zero Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,777
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Quote:
Originally Posted by Chuck_Ds View Post
Thanks a million!! That help-sheet makes sense and drives the point home. Sorry about the name thing. I saw your "handle" that says "je suis Charlie" (I am Charlie) and figured that was your name. Yeah, I know it didn't say, "Je m'appelle Charlie" (my name is Charlie). I guess I was a few days out of the loop on that being a slogan related to recent international events. Thanks again for everything, Herbert...LOL... Just Kidding... Thanks, Pecoflyer...
Np with Charlie ( for me, allas not for those who were slaughtered). And yes, you are right to use the SUMIF function. I always seem to forget that it exists
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #11  
Old 01-13-2015, 08:33 AM
Chuck_Ds Chuck_Ds is offline How to make Excel stop treating blank cells as zero Windows 7 32bit How to make Excel stop treating blank cells as zero Office 2007
Novice
How to make Excel stop treating blank cells as zero
 
Join Date: Jan 2015
Posts: 6
Chuck_Ds is on a distinguished road
Default

Thanks to both of you!! I had been researching for a week before I joined this site, but now I know why I couldn't find anything: because the SUMPRODUCT used in this fashion is a bit of a workaround. I tried the SUMIF just to test my understanding and apply a similar function, but the SUMPRODUCT fits the bill in this case because it treats a blank cell differently than a cell that has zero. In my real-life scenario, there is a difference because a blank cell should be ignored (as I have not received data for those), whereas a cell with zero should be computed because that's the true value. So because of you two, I have two additional tools in my belt to use for future spreadsheets!!!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make Excel stop treating blank cells as zero Excel VBA - Mandatory cells cannot stay blank? hussnainh8 Excel 9 12-28-2014 09:40 AM
Help with Subtotal(103, ) formula and blank cells zhl203 Excel 1 07-30-2014 03:40 PM
How to make Excel stop treating blank cells as zero want to make letterhead template with second page blank William Whitney Word 4 06-20-2014 05:59 AM
Join cells together separated by ; when some are blank leemoreau Excel 3 11-03-2013 11:22 AM
How to make Excel stop treating blank cells as zero How to stop correcting zeroes in cells ? kevin_ms Excel 4 09-14-2008 10:08 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft