LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Summation with a Condition

Hi George,

It's all to do with dates. Excel stores dates a the number of days since,
and including, 1st Jan 19000. So a cell with 1st Jan 1900 in it actually
contains the value 1. You can actually enter 0/1/1900 (UK style that is,
0thJan 1900) in a cell, which equates to a value of 0, and this is the
reason.

If you have a blank cell, when you run a formula that would return a numeric
result, Excel treats it as 0. For instance, if A1 is blank, =2^A1 returns 1
(2^0). Similarly =MONTH(A1) returns 1, because it is effectively saying
=MONTH(0th Jan 1900). So in your formula, testing for Jan, all the blank
cells match, For Feb or any other month they do not. Eliminating the blanks
with a separate test eliminates the problem.

Regards

Bob

"GeorgeF" wrote in
message ...

Hi Bob Phillips
Thanks a lot. Great answer. You are right, in that the January
collection of Invoice totals was blank cell sensitive. To test the
idea, I shortened the "Range 1" size to end of current data and got the
correct January Total, without your adddition. But, I must have an
extended range of blank cells for incoming future invoices that I want
totalled automatically. Your prefix insert test for blank cells has
yielded the correct amount for January. I carried the new formula
forward to all the months and altered the open cell length of the Range
several times which still gave the correct amounts. Is it too
theoretical question to ask *why*? That is, checking for blank cells
seems to be a problem of January alone. It's not the cell location
because I substituted February and other months in the January cell
location and got the correct answers for the given mionth. Hmmmmm!!
Thanks again. George F


--
GeorgeF
------------------------------------------------------------------------
GeorgeF's Profile:

http://www.excelforum.com/member.php...o&userid=24124
View this thread: http://www.excelforum.com/showthread...hreadid=379436



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Summation [email protected] Excel Discussion (Misc queries) 2 November 28th 07 05:12 PM
Summation from a to b jeblunk Excel Worksheet Functions 3 December 4th 05 02:14 PM
Summation Dan W. Excel Programming 0 June 29th 04 06:50 PM
VBA code to perform summation and product summation 21MSU[_2_] Excel Programming 4 May 17th 04 07:19 PM
Summation No Name Excel Programming 3 April 14th 04 09:59 PM


All times are GMT +1. The time now is 05:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"