+ Reply to Thread
Results 1 to 7 of 7

adding hours

  1. #1
    Registered User
    Join Date
    01-27-2014
    Location
    kathmandu
    MS-Off Ver
    Microsoft Excel for Mac version 16.68, Office LTSC
    Posts
    33

    adding hours

    i converted a pdf to excel now i am trying to add hours from the text box but gives me error #value!

    adding 18339:29 & 18400:42

    when i click on show calculation steps it shows ("18400:42" +"18339:29")

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: adding hours

    Try this...

    In A1 Cell
    18339:29

    In A2 Cell
    18400:42

    In A3 Cell

    =SUMPRODUCT(1*LEFT(A1:A2,FIND(":",A1:A2)-1))+INT(SUMPRODUCT(1*RIGHT(A1:A2,2))/60)&":"&TEXT(MOD(SUMPRODUCT(1*RIGHT(A1:A2,2)),60),"00")


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    01-27-2014
    Location
    kathmandu
    MS-Off Ver
    Microsoft Excel for Mac version 16.68, Office LTSC
    Posts
    33

    Re: adding hours

    Thank you very much sir! worked like a charm.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: adding hours

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  5. #5
    Registered User
    Join Date
    01-27-2014
    Location
    kathmandu
    MS-Off Ver
    Microsoft Excel for Mac version 16.68, Office LTSC
    Posts
    33

    Re: adding hours

    HI,
    what if its for individual cells, lets say G2 and N2, Can you please provide a forumla ?
    Last edited by pannam; 01-28-2014 at 01:00 AM. Reason: deleted quote

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: adding hours

    Just adapt the ranges for single cells alone

    Please click Edit on Post #5 and remove my quoted sentence.

    Don't quote whole posts -- it's just clutter. If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding.

  7. #7
    Registered User
    Join Date
    01-27-2014
    Location
    kathmandu
    MS-Off Ver
    Microsoft Excel for Mac version 16.68, Office LTSC
    Posts
    33

    Re: adding hours

    As an alternative i used this as a module,

    =================================================
    Option Explicit
    Function SubtrTimes(CurrentTime As Range, LastTime As Range) As String
    Dim v1 As Variant, v2 As Variant
    Dim t1 As Long, t2 As Long
    Dim temp As Double
    Dim hrs As Long, mins As Long
    v1 = Split(CurrentTime.Text, ":")
    v2 = Split(LastTime.Text, ":")

    t1 = v1(0) - v2(0)
    t2 = v1(1) - v2(1)

    temp = t1 + t2 / 60
    hrs = Int(temp)
    mins = (temp - Int(temp)) * 60

    SubtrTimes = Format(hrs, "#0") & Format(mins, "\:00")

    End Function
    ==============================

+ 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] Adding Hours Worked minus lunch break IF over 5 hours
    By Gtrtim112 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-15-2013, 11:16 PM
  2. Adding daily run hours to cumulative total hours
    By Rodstew in forum Excel General
    Replies: 8
    Last Post: 08-08-2012, 07:10 PM
  3. Adding all the hours - how?
    By ice_black in forum Excel General
    Replies: 1
    Last Post: 07-26-2011, 06:02 PM
  4. Excel 2007 : adding more than 24 hours
    By kadafi in forum Excel General
    Replies: 4
    Last Post: 08-08-2010, 09:48 PM
  5. Adding Hours
    By kevb8ll in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-26-2007, 07:03 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