+ Reply to Thread
Results 1 to 12 of 12

How to find the difference betwwen two rows based on conditions

  1. #1
    Registered User
    Join Date
    09-21-2013
    Location
    chennai,India
    MS-Off Ver
    Excel 2010
    Posts
    75

    How to find the difference betwwen two rows based on conditions

    Hi All,

    I need to find the difference between two rows based on the two columns.

    I have many columns in my sheet but few columns are going to be used for this.
    tracking id, activity type and activity time are the columns.

    I used to get this file from a reporting tool, which capture the activity timings of the tracking id.
    i want to know how long the tracking id was in that particular activity type.

    Activity types are open, accept/reject,pending confirmation, resolved, closed, etc.,

    But for pending confirmation, the time taken would be calculated based on the second next row not the next row.If you see the attachment,will help you to know the exact requirement.


    Thanks in Advance.tracking_id.xlsx

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: How to find the difference betwwen two rows based on conditions

    By find the difference do you mind to highlight both rows one with the "pending Confirmation" and the next one or to find the time between Pending and the second next based on ID?
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Registered User
    Join Date
    09-21-2013
    Location
    chennai,India
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: How to find the difference betwwen two rows based on conditions

    Hi Robert,

    yeah i want to find the time between pending and the second next based on ID.

  4. #4
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: How to find the difference betwwen two rows based on conditions

    Copy of tracking_id.xlsx
    Please see attached.

  5. #5
    Registered User
    Join Date
    09-21-2013
    Location
    chennai,India
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: How to find the difference betwwen two rows based on conditions

    Hi Robert,

    I copied that formula in my original sheet, but its not working.

    =IF(H3=$L$1,"",IFERROR(INDEX($I4:$I$100,MATCH(1,IF($C4:$C$100=C3,IF($H4:$H$100<>$L$1,1)),0))-I3,""))

    i used the above formula. But i am getting #value for "$C4:$C$100=C3".

    Column C contains tracking id.

  6. #6
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: How to find the difference betwwen two rows based on conditions

    Did you confirm the formula with Control+Shift+enter?
    Not sure about your set up in original workbook so can not tell what in C3.Can you tell?
    Could you post your workbook?

  7. #7
    Registered User
    Join Date
    09-21-2013
    Location
    chennai,India
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: How to find the difference betwwen two rows based on conditions

    HI Robert,

    Below the source sheet.

    tracking_id_source.xlsx

  8. #8
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: How to find the difference betwwen two rows based on conditions

    You need to confirm with COntrol +Shift+Enter.
    Sort by Id then by Date.
    With 10000 rows the calculation will take a while.

  9. #9
    Registered User
    Join Date
    09-21-2013
    Location
    chennai,India
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: How to find the difference betwwen two rows based on conditions

    Robert,
    Its not working

  10. #10
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: How to find the difference betwwen two rows based on conditions


  11. #11
    Registered User
    Join Date
    09-21-2013
    Location
    chennai,India
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: How to find the difference betwwen two rows based on conditions

    Thanks Robert,

    Its working now..

  12. #12
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: How to find the difference betwwen two rows based on conditions

    You are welcome.

+ 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. How do find the difference between 2 times based on a third column
    By jtpryan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-21-2013, 11:18 PM
  2. Find 2 types of value based on 3 match conditions
    By Elza in forum Excel General
    Replies: 9
    Last Post: 11-02-2012, 03:03 PM
  3. [SOLVED] Excel 2007 : To find the difference rows....
    By upmuthukumar in forum Excel General
    Replies: 3
    Last Post: 06-30-2012, 01:42 AM
  4. Replies: 5
    Last Post: 11-09-2011, 01:01 PM
  5. Find Earliest Date based on conditions
    By ShredDude in forum Excel General
    Replies: 6
    Last Post: 07-14-2007, 01:56 PM

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