+ Reply to Thread
Results 1 to 5 of 5

Problem matching columns and calculating a time difference. For Pros.

  1. #1
    Registered User
    Join Date
    11-06-2012
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2008 Mac
    Posts
    3

    Problem matching columns and calculating a time difference. For Pros.

    Hi. I'm sorry about the title that might confuse, but since you're reading this you have found it.

    I have already spent several hours trying to solve this following problem, but haven't advanced anywhere nearer to a solution.

    I have a spreadsheet containing the following columns:

    Column A contains many rows with timestamps from a stopwatch.
    Column B contains for every timestamp a number from 1 to 6 (the action that took place at this particular time).

    I want a formula with the following properties:

    The time that has passed between an event "1" and an event "2".

    Difficulties:

    "2" always follows "1", but not necessarily directly after each other. So you could say "1" is the start and "2" is the end, but there might be things in between that don't matter.
    There is more than one pair of "1" and "2" in Column B.

    I have no idea how to do this and I appreciate any help!!

    Thank you very much and good luck!

    Marius.

    I'm happy to answer any questions that might arise.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Problem matching columns and calculating a time difference. For Pros.

    Marius,

    Welcome to the forum!
    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
    To attach a file, click the "Go Advanced" button and then click the paperclip icon to open the Manage Attachments dialog.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    11-06-2012
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2008 Mac
    Posts
    3

    Re: Problem matching columns and calculating a time difference. For Pros.

    Thanks tigeravatar.

    For all those keen to solve my problem, here is a dummy-workbook how my data looks like.dummy-workbook.xlsx

    Marius.

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Problem matching columns and calculating a time difference. For Pros.

    Marius,

    Attached is a modified version of your example file.
    Row 1 is a header row
    Actual data starts in row 2
    Column D is the list of Event "1" times
    Column E is the list of Event "2" times
    Column F is their differences

    In cell D2 and copied down to D31 is this formula (to get the list of Event "1" times):
    Please Login or Register  to view this content.

    In cell E2 and copied down to E31 is this formula (to get the list of Event "2" times):
    Please Login or Register  to view this content.

    In cell F2 and copied down to F31 is this formula (to get their differences):
    Please Login or Register  to view this content.

    Cells D2:F31 are formatted as [h]:mm:ss
    Does that work for you?
    Last edited by tigeravatar; 11-06-2012 at 01:10 PM. Reason: Added attachment

  5. #5
    Registered User
    Join Date
    11-06-2012
    Location
    Göteborg, Sweden
    MS-Off Ver
    Excel 2008 Mac
    Posts
    3

    Re: Problem matching columns and calculating a time difference. For Pros.

    Hats off to tigeravatar!
    Thank you. Yes, that works. Elegant solution, although I admittedly don't understand half of how the formulas work, but they do and I can live with that at this moment in time.
    Thanks again and all the best.
    Marius.

+ 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