Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8979323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:49:30+00:00 2026-06-15T19:49:30+00:00

May I know is there any way to add two or more time durations

  • 0

May I know is there any way to add two or more time durations directly? One more thing: they are in the Excel columns for each row which has been defined or evaluated and stored in those columns. They are in dd:hh:mm format in the Excel column stored. Without going for coulmn by column addition for each row, is there any technique which can directly add them by searching their format and put into another column as their summation?

10:23:10 (dd:hh:mm).

Update

PID     T1Nm             T1SD                   T1FD                T1TotTime     T2Nm        T2SD                     T2FD              T2TotTime      TotalTaskDuration

 10      T1      9/27/2012  12:53:03 PM   9/3/2012  1:52:20 PM       23:23:0      T2   9/26/2012  5:55:32 PM    9/14/2012  1:52:20 PM      12:4:3

 20      T1      9/6/2012  8:29:34 AM     9/17/2012  8:59:36 AM      11:0:30      T4   9/26/2012  5:55:32 PM    9/14/2012  1:52:20 PM      12:4:3

Here i just try to give you a diagrammatic views,so that you can understand what i was looking for. There are different time format can have in each column.So we need to catch only the dd:hh:mm format and add them up and need to store it to the last column.Hope this description will help you to understand the whole thing i am looking for.

EDIT:
getting total time calculation for all columns are same.Please advice a fix.
Unexpected Output

enter image description here

UPDATE

Still error in formatting:

enter image description here

thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:49:32+00:00Added an answer on June 15, 2026 at 7:49 pm

    Spreadsheet/code example: http://www.bumpclub.ee/~jyri_r/Excel/Summing_time_differences.xls

    Sub CalculateTotalTimes()
    
      Dim rng As Range
      Dim column_counter As Long
      Dim row_counter As Long
      Dim time_sum() As Variant
      Dim dest_rng As Range
      Dim x As Variant
    
     Set rng = ActiveSheet.UsedRange
    
     ReDim time_sum(rng.Rows.Count)
    
         For row_counter = 1 To rng.Rows.Count
             time_sum(row_counter - 1) = 0
               For column_counter = 1 To rng.Columns.Count - 1 'TotalTaskDuration is the last column, not counted
                  If rng(row_counter, column_counter).NumberFormat = "dd:hh:mm" Then
                    time_sum(row_counter - 1) = time_sum(row_counter - 1) + rng(row_counter, column_counter).Value2
                  End If
               Next
         Next
           x = LBound(time_sum)
             For x = LBound(time_sum) To UBound(time_sum) - 1
                time_sum(x) = time_sum(x + 1)
             Next
    
       ReDim Preserve time_sum(UBound(time_sum) - 1)
    
       Set dest_rng = ActiveSheet.Cells(2, rng.Columns.Count)
        Set dest_rng = dest_rng.Resize(UBound(time_sum), 1)
      dest_rng.Value = Application.WorksheetFunction.Transpose(time_sum)
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

May I know if there is any way to remove non-alphabetical symbols from a
This may be a silly question I don't know. Is there a way to
In PHP, I know there is no official way to delete items once they
Is there any way that I can add const keyword to an array passed
for website that embed flash to capture camera (red5..etc). may i know is there
As you may know, in many occasions, there is a need to flag some
is there any way how to execute validation directives saved in database ? See,
I have two tables that I'm querying from. In one table, there are fields
I am using Xcode 4.4. As you may all know, there is an easy
Is there any way I can filter my NHibernate query on the SubType field

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.