Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Date Calculation inconsistant results

Hi, I want to calculate the amount of time between two dates, using
the following:
=IF('Data Entry'!A2=0,,IF('Data Entry'!S2="",Background!A2-'Data
Entry'!D2,'Data Entry'!S2-'Data Entry'!D2))
My problem is, that on some rows the calculation works fine and will
return a meaningful result, yet in others it returns a result such as
"39696". The formula, formatting and all other inputs seem fine, and
there is no reason that I have been able to identify yet which is
consistent between the differeing result.

Any ideas?

Thanks so much...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Date Calculation inconsistant results

Dates in XL are stored as long integers. Basically it is the number of days
since Jan 1, 1900. If you subtract today - 0 you end up with 39,644. Look for
places where you might be subtracting 0 or such...
--
HTH...

Jim Thomlinson


" wrote:

Hi, I want to calculate the amount of time between two dates, using
the following:
=IF('Data Entry'!A2=0,,IF('Data Entry'!S2="",Background!A2-'Data
Entry'!D2,'Data Entry'!S2-'Data Entry'!D2))
My problem is, that on some rows the calculation works fine and will
return a meaningful result, yet in others it returns a result such as
"39696". The formula, formatting and all other inputs seem fine, and
there is no reason that I have been able to identify yet which is
consistent between the differeing result.

Any ideas?

Thanks so much...

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default Date Calculation inconsistant results

Excel stores dates as serial numbers starting from 1/1/1900
Your number 39696 is Sept 5 2008
It is not the result that is inconsistent but the formatting of your cells
Just format your cell as a date using the local custom dd/mm/yy or mm/dd/yy,
etc
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

wrote in message
...
Hi, I want to calculate the amount of time between two dates, using
the following:
=IF('Data Entry'!A2=0,,IF('Data Entry'!S2="",Background!A2-'Data
Entry'!D2,'Data Entry'!S2-'Data Entry'!D2))
My problem is, that on some rows the calculation works fine and will
return a meaningful result, yet in others it returns a result such as
"39696". The formula, formatting and all other inputs seem fine, and
there is no reason that I have been able to identify yet which is
consistent between the differeing result.

Any ideas?

Thanks so much...



Reply
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
Calculation results as static data not formula. tcidawn Excel Worksheet Functions 4 September 12th 07 05:12 PM
Help please... Simple calculation - with unexpected results MLK Excel Worksheet Functions 7 July 29th 06 12:03 AM
Calculation on SUMIF Results Andy B Excel Worksheet Functions 3 October 9th 05 04:47 AM
Conditional formatting producing inconsistant results? Craig Sink Excel Discussion (Misc queries) 3 August 16th 05 03:40 PM
Save calculation results RC[_2_] Excel Programming 0 July 30th 03 11:56 AM


All times are GMT +1. The time now is 01:47 AM.

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

About Us

"It's about Microsoft Excel"