PC Review


Reply
Thread Tools Rate Thread

Date Calculation inconsistant results

 
 
debbiecundill@gmail.com
Guest
Posts: n/a
 
      15th Jul 2008
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 With Quote
 
 
 
 
Jim Thomlinson
Guest
Posts: n/a
 
      15th Jul 2008
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


"(E-Mail Removed)" 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...
>

 
Reply With Quote
 
Bernard Liengme
Guest
Posts: n/a
 
      16th Jul 2008
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

<(E-Mail Removed)> wrote in message
news:9826256a-8c76-4716-b380-(E-Mail Removed)...
> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inconsistant query results Claire Microsoft Access Queries 1 19th Mar 2009 07:10 PM
inconsistant results with Onformat UnderGround Microsoft Access Reports 3 20th Mar 2006 03:34 AM
Conditional formatting producing inconsistant results? Craig Sink Microsoft Excel Misc 3 16th Aug 2005 03:40 PM
inconsistant query results (cross posted) Tom Williams Microsoft Access Queries 2 16th Oct 2003 05:35 PM
Save calculation results RC Microsoft Excel Programming 0 30th Jul 2003 11:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:12 AM.