View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Johnson
 
Posts: n/a
Default Sumproduct Date clarification

Hi Walter,
I think the reason is that when a cell is formatted as date it displays
the date but the real value is hidden behind the scenes and is a value
depending on the computer's date system.
For example, say A1 is formatted as Date and B1 is formatted as Number.
If you then type say 2/3/06 into A1 you will probably see (depending on
the details of the date format chosen) 2/03/2006. Now, if you type into
B1 the formula =A1 you will probably see; depending on the date system
used by your computer, 1900 or 1904; 38778.00 or 37316.00 respectively.
So, in the formula that was using p$4 excel was using the hidden value
to do the calculation.
In your other formula using 1/6/06, excel has calculated 1/6/06
algebraically as 1/6/6 = 1/36 = 0.03. For date calculations this
corresponds to just 3 hundredths of the first day of the starting day
of your computer's date system 1/1/1900 or 1/1/1904 hence, nothing but
0's. The use of date(2006,1,1) has corrected that error.

Ken Johnson