+ Reply to Thread
Results 1 to 6 of 6

Search for matching data and then calculate the time difference

  1. #1
    Registered User
    Join Date
    05-20-2015
    Location
    Indiana, United States
    MS-Off Ver
    2007
    Posts
    4

    Search for matching data and then calculate the time difference

    I have a spreadsheet that lists the time that a device command was sent and the time the response was received. I am trying to calculate the system latency time. The response may occur after more than one command/response has occurred . I need to find the matching response and then calculate the time difference. The time is listed in column A. An example spreadsheet is attached (the real spreadsheet has several 100 rows) and matching data is highlighted. So for example. The response for Row 5 is shown in Row 8. So I need to calculate the time difference (171.352504-171.136878).
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Search for matching data and then calculate the time difference

    Try this formula in D1 and copy it down.

    Please Login or Register  to view this content.
    Edit: This is an array formula. You have to enter it by pressing CTRL+SHIFT+ENTER.

  3. #3
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Search for matching data and then calculate the time difference

    Sorry, I got that wrong. This array formula works.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-20-2015
    Location
    Indiana, United States
    MS-Off Ver
    2007
    Posts
    4

    Re: Search for matching data and then calculate the time difference

    Thank you for your help. My spreadsheet displays an error (#VALUE!) in the first 12 calculations but rows 12 and 13 are correct. This gets me closer!

  5. #5
    Registered User
    Join Date
    05-20-2015
    Location
    Indiana, United States
    MS-Off Ver
    2007
    Posts
    4

    Re: Search for matching data and then calculate the time difference

    Thank you nigelbloomy for you help. The following formula seems to work.

    =IF(B1="Device",INDEX(A2:$A$13,MATCH(C1,C2:$C$13,0))-A1,"")

  6. #6
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Search for matching data and then calculate the time difference

    My formula had to be entered as an array, so after you paste it in you have to press CTRL+SHIFT+ENTER instead of just ENTER. That is why you got those #VALUE! errors.

    I am glad it led you to think up your own formula though because you did it without needing an array. I like your formula better. Nice job.

+ 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] calculate time difference
    By nancy3822 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2013, 05:51 AM
  2. Replies: 3
    Last Post: 03-02-2012, 08:18 PM
  3. How to calculate time difference
    By DeepakS in forum Excel General
    Replies: 10
    Last Post: 09-16-2011, 08:54 AM
  4. [SOLVED] Calculate time difference
    By Mats-Lennart Hansson in forum Excel General
    Replies: 2
    Last Post: 01-11-2005, 12:06 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