Results 1 to 3 of 3

Thread: calculate time difference between cells

  1. #1
    Moderator VBAX Master austenr's Avatar
    Sep 2004

    calculate time difference between cells

    How would you extract the time from a cell formatted as 01/01/2017 01:00 PM and get the difference from another cell with the same format without splitting the cells out into two columns?
    Peace of mind is found in some of the strangest places.

  2. #2
    If they are date/time numbers, then =A1-B1. If more than 24 hours, convert the day difference to hours. e.g. =(A1-B1)*(24) or, do the A1-B1 but set the Number Format to [hh].

  3. #3
    Not exactly sure I understand, but I think it's just a matter of subtracting and formatting


    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s)
    (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums

Posting Permissions

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