+ Reply to Thread
Results 1 to 5 of 5

"Time" problem: Need function to find time&date - ?hours

  1. #1
    Registered User
    Join Date
    11-22-2008
    Location
    Ottawa, ON, Canada
    Posts
    16

    "Time" problem: Need function to find time&date - ?hours

    Ok .. I have a spreadsheet i got some help with a while back . . .
    Trying to add some features to it and run into an issue!

    Ok ... Here are the fields we are working with!

    A1= 13:30:00 17/12/2008
    (in other words 1:30pm on date given) - Need to know proper cell number format!!

    B1= 23:00:00
    (this represents 23 hours) - format for cell is [h]:mm:ss

    C1= Unknown function
    (This field is my problem!!)
    Answer here SHOULD be "14:30:00 16/12/2008"


    I need a function for C1 (using A1 and B1) that will give me the time and
    date 23 hours earlier or however many hours:mins:secs is specified in B1!
    Also need to know what number format to use for both A1 and C1
    Last edited by Powrpak; 12-17-2008 at 08:14 PM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284
    Just subtract them,

    =A1-B1

  3. #3
    Registered User
    Join Date
    11-22-2008
    Location
    Ottawa, ON, Canada
    Posts
    16
    First ...
    That doesnt tell me the cell number format to make that work!

    Secondly, tried that with just time and cell format of [h]:mm:ss and all it
    gave me was ######### as it cannot show negative times!

    If i just put the A1 as normal formatting and that info in the cell,
    answer comes back as #value because the answer is invalid!

    I thank you for attempting to help but test it yourself and you'll see it doesnt work!
    Last edited by Powrpak; 12-17-2008 at 06:33 AM.

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    What Bob has told you is correct, you just need to make the column width wider to display the result.

    The format of cell A1 is a custom format hh:mm:ss dd/mm/yyyy
    The format of cell B1 is hh:mm:ss
    The format of cell C1 needs to be set the same as A1
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  5. #5
    Registered User
    Join Date
    11-22-2008
    Location
    Ottawa, ON, Canada
    Posts
    16
    Thanks alot ..
    It was the formatting that was killing me and not working for some reason .. lol

+ 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