Adding time in two columns

Santo21

New Member
Joined
Sep 17, 2014
Messages
3
I download a report from a central server in Excel format which has names and time to show total worked hours. In this report I need to add time in two columns to get the total hours.


Here is the example:
In the first column the time is given as :18:44 and in the second column :27:04. If I use the formula =SUM(a2:b2) it gives 0:00:00. But when I manually add a 0 before the time ie 0:18:44 & 0:27:04, it adds and shows result as 0:45:48.

Now to get the total time, I add 0, which takes longer time. Is there a way to get the total time in much easier way? Please help.
 

Santo21

New Member
Joined
Sep 17, 2014
Messages
3
Change your formula to

=SUM(TIMEVALUE("0"&A2),TIMEVALUE("0"&B2))
Thanks for your quick reply. This formula works when the time is :18:44 & :27:04 (mm:ss). But for certain employees, the time is 1:15:54 (hh:mm:ss) and :14:33 (mm:ss) or it can be in mm:ss and hh:mm:ss format. So, is there a way to make sure that when I calculate the total worked hours, the formula takes care of this?

Please do suggest.
 
Last edited:

Santo21

New Member
Joined
Sep 17, 2014
Messages
3
++Special-K99
Special thanks to Special-K99, for helping me with the formula, with this formula I took someone else help and he modified the formula and helped me to resolve my query.

Formula is =SUM(IFERROR(TIMEVALUE("0"&C2),C2),IFERROR(TIMEVALUE("0"&D2),D2))
 

Forum statistics

Threads
1,081,530
Messages
5,359,347
Members
400,524
Latest member
Excelbat

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top