+ Reply to Thread
Results 1 to 7 of 7

Calculating Time Variance

  1. #1
    Registered User
    Join Date
    04-03-2007
    Posts
    39

    Calculating Time Variance

    Dear Clever People,

    I'm trying to calculate the variance between planned date & time of arrival vs actual date & time of arrival.

    I attach the workbook as am a bit useless at explaining myself....

    What I've done is in H14 subtract the actual date of arrival (F14) from planned date of arrival (C14). This result is the only way I could think of dealing with crossing over midnight. As a result I14 should subtract the actual time of arrival (E14) from planned time of arrival (B14):

    =SUM(E14-B14,H14)

    This method works well when the arrival was later than expected but doesn't work if the arrival was sooner than expected.

    I'm sure you're all giggling at the novice........if so, please help!

    Last edited by winnie_shrub; 01-27-2009 at 04:33 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculating Time Variance

    No we're not giggling... dealing with negative time in XL is a real headache, you can't easily display a negative time value
    (given mix of positive & negative time you could do it switching to 1904 system but this is really not advisable)

    Alternatives:

    -- store result as decimal ( eg -2.5 = gain of 2.5hrs )

    -- ensure the time is always calculated positively but use an adjacent column to flag gain/loss such that you can sum the time accordingly
    (ie differentiate between +ve/-ve)

    Which would be your preference ?

  3. #3
    Registered User
    Join Date
    04-03-2007
    Posts
    39

    Re: Calculating Time Variance

    Hi,

    I think I'd prefer to show the result as a decimal.

    Please recommend a way forward.....

    Thanks a lot!

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculating Time Variance

    Formula:

    Please Login or Register  to view this content.
    You can dispense with H14 etc... dates in XL are integers and time decimal so you can simply add the two Actual values together (E & F) to form one number and subtract the sum of the Planned date + time to give you a result... multiply by 24 to force into decimal -- 2.5 equates to 2hr 30min.

    Set format of I14 etc to be Numerical (to 2 decimals).

  5. #5
    Registered User
    Join Date
    04-03-2007
    Posts
    39

    Re: Calculating Time Variance

    Thank you, that's precisely what I was after.

    It has triggered another question though. I wonder if there's a way of getting Excel to recognise time without having to enter it with a colon (i.e. 1000 instead of 10:00)?

    Any ideas anyone?

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculating Time Variance

    I strongly advise against entering time values in anything other than time format.

    It will cause you many more problems in the long run.

  7. #7
    Registered User
    Join Date
    04-03-2007
    Posts
    39

    Re: Calculating Time Variance

    OK, thanks for the advice. I'll take your word for it.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1