+ Reply to Thread
Results 1 to 10 of 10

Calculating difference of time in one cell

  1. #1
    Forum Contributor
    Join Date
    05-06-2017
    Location
    London, United Kingdom
    MS-Off Ver
    2016
    Posts
    281

    Calculating difference of time in one cell

    Hi guys,
    is there anyway of finding out a calculation of a time difference in one cell? so for example if A1 = 13:30 - 17:15 , Is there a way in B2 to find out the difference between that time?

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Calculating difference of time in one cell

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Format cell B2 as: h:mm;@
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Forum Contributor
    Join Date
    05-06-2017
    Location
    London, United Kingdom
    MS-Off Ver
    2016
    Posts
    281

    Re: Calculating difference of time in one cell

    Thank you so much! it worked, even just formatting it as time worked!

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Calculating difference of time in one cell

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

  5. #5
    Forum Contributor
    Join Date
    05-06-2017
    Location
    London, United Kingdom
    MS-Off Ver
    2016
    Posts
    281
    Quote Originally Posted by JeteMc View Post
    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.
    Just a quick question, is there a way to implement iferror if it's blank to return nothing into the formula

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Calculating difference of time in one cell

    You could modify the formula as follows, however it will take the time to do the calculation first, so I think that the second modification would be preferable:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You could modify the formula as follows so that if A1 is blank B2 will also be blank and it won't proceed to attempt the calculation:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.

  7. #7
    Forum Contributor
    Join Date
    05-06-2017
    Location
    London, United Kingdom
    MS-Off Ver
    2016
    Posts
    281

    Re: Calculating difference of time in one cell

    That worked perfectly thanks a lot!

    Going to get a bit annoying, but one more question haha..

    so the answer is in B1, say i used the formula down to B45, and had multiple 3.45 from calculating 03:30 - 07:15.. how would i sum up all the hours? because right now its giving incorrect answers. any idea on a formula i could use to calculate it? Normal =SUM is just giving me 45, because theres 45 cells

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Calculating difference of time in one cell

    The cell with the summation should be custom formatted [h]:mm
    To custom format select the cell with the summation and simultaneously press the Ctrl and 1 keys, custom will be the last option on the number tab.
    Either type [h]:mm in the 'Type' window or select that format from the list below that window.
    Let us know if you have any questions.

  9. #9
    Forum Contributor
    Join Date
    05-06-2017
    Location
    London, United Kingdom
    MS-Off Ver
    2016
    Posts
    281

    Re: Calculating difference of time in one cell

    That did work, thanks for all your help!

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Calculating difference of time in one cell

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help calculating difference in time
    By jes269 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2014, 10:55 AM
  2. [SOLVED] Calculating the Difference in Time
    By forexcellence13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2013, 10:56 PM
  3. [SOLVED] Calculating time difference?
    By devpp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2013, 02:31 AM
  4. Calculating time difference between PM and AM
    By Paul64 in forum Excel General
    Replies: 4
    Last Post: 10-04-2011, 02:33 PM
  5. Calculating time difference
    By TomBP in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-02-2010, 04:59 AM
  6. Calculating time difference
    By Sibrulotte in forum Excel General
    Replies: 0
    Last Post: 07-28-2009, 09:14 AM
  7. Calculating time difference between two days capturing the overnight time.
    By Monica_La in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-08-2007, 11:22 AM

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