+ Reply to Thread
Results 1 to 10 of 10

Excel 2007 : Calculating elapsed time which meet two criteria

  1. #1
    Registered User
    Join Date
    08-25-2010
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Calculating elapsed time which meet two criteria

    I have a table full of data (id, time, state). What I want to do for data with the same id, is look for state A, and state C, and figure out the time elasped between them. I somewhat know how to do it if it was from state A to B, as they would be beside each in the table, but if it jumps a state, I don't really know where to start.

    Pointers in the general direction would be appreciated. I'm not actually sure if this is possible to do, since I have only done simple calculations that used the line before or after.

    Thanks.
    Attached Files Attached Files
    Last edited by Avyx; 08-31-2010 at 11:15 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,353

    Re: Possible method to do this operation?

    It would be helpful if you posted a sample workbook with some typical data examples.

    Regards

  3. #3
    Registered User
    Join Date
    08-25-2010
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Possible method to do this operation?

    What is the typical method you guys use on these forums when it comes to providing sample workbooks?

    Attach it or is there some other method?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,353

    Re: Possible method to do this operation?

    Go Advanced
    Select the paperclip icon
    browse for the sample file
    upload
    post

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Possible method to do this operation?

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Registered User
    Join Date
    08-25-2010
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Calculating elasped time which meet two criteria

    Edited and added a little bit more information to first post.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculating elasped time which meet two criteria

    Quote Originally Posted by Avyx View Post
    I have a table full of data (id, time, state). What I want to do for data with the same id, is look for state A, and state C, and figure out the time elasped between them. I somewhat know how to do it if it was from state A to B, as they would be beside each in the table, but if it jumps a state, I don't really know where to start.
    Generally a good idea to outline desired results when you provide sample data as it helps clarify the logic.

    As it is - I'm not really sure I understand the requirements - if you wanted a cumulative elapsed time then using your sample:

    Please Login or Register  to view this content.
    Apply Custom Format to D2 onwards of: [h]:mm:ss

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,353

    Re: Calculating elapsed time which meet two criteria

    In cell D3:

    Please Login or Register  to view this content.

    And in cell E3:

    Please Login or Register  to view this content.

    And drag down.

    There is an assumption that you will move from A to B to C so I guess there could be circumstances where this will not work.

    But food for thought perhaps?

    Regards

  9. #9
    Registered User
    Join Date
    08-25-2010
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Calculating elapsed time which meet two criteria

    Thanks for all the feedback.

    I may have made the sample file a bit too simple, as there are more than 3 states and does not necessarily move from A to B to C.

    Going to try an attempt to calculate the times between each status change and then start a sum if it is status A and reset the sum if it is status C.

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,353

    Re: Calculating elapsed time which meet two criteria

    Good luck.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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