Results 1 to 2 of 2

Compare times between two sheets and delete rows when time difference is bigger than 4 sec

Threaded View

  1. #1
    Registered User
    Join Date
    02-19-2018
    Location
    Czech Republic
    MS-Off Ver
    Excel 2016
    Posts
    68

    Post Compare times between two sheets and delete rows when time difference is bigger than 4 sec

    Hello everybody,

    We perform 100% vision control on hexagonal tubes with two cameras: One camera points to one edge of the tube, and the second camera points to the other edge of the tube. Every day we measure 1000 tubes aprox, meaning that we have the data of 1000 edges coming from Camera 1 and 1000 edges coming from Camera 2.

    The issue that I'm dealing with is that for some unkown reason there are some camera errors, that while measuring the part, sends data to one camera but no the second camera, or the second camera sends data while first camera don't.

    So, I assumed that the maximum desynchronization between the two cameras is less than 4 seconds, so the challenge is to check that the time difference of cells B3-B2 of sheet DataCAM1 doesn't have a difference bigger than 4 seconds between the time difference of cell B3-B2 of sheet DataCAM2, then the same with B3-B4, B4-B5, etc... up to any row containing time. When you find a difference of 4 seconds or bigger, then I need to delete the whole row of that "single" measurement that doesn't respect this time difference and check if the following one complies with this request and the continuosly calculating the time differences until everything matches and is synchronized within less than 4 seconds comparing data of CAM1 vs CAM2.

    The attached example shows that eveything is OK until you see that there are measures at 13:37 and 14:05 in CAM2 but not in CAM1, so the challenge is to erase those values and continuing checking below, recalculating the times differences after delete every row, and also taking into account that in CAM1 you can also have measures that doesn't exist in CAM2, like the input of 14:22 that also needs to be deleted.

    Example.JPG

    Just for info, in the attached excel I have introduced the sheet Test that shows the row of the sheet that needs to be deleted, but the formulas then needs to be recalculated after delete one row.

    Hope you can help me please to delete all the rows that doesn't match using a macro!

    Thank you in advance for your help!!
    Attached Files Attached Files
    Last edited by thorblow; 06-11-2021 at 04:56 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Compare two excel files and paste a cell value if two values match
    By carladalessandro in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-20-2020, 07:36 AM
  2. How to create a conditional macro so it doesn't erase my work?
    By Keegan1116 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-19-2020, 05:01 PM
  3. [SOLVED] Cycle through all excel files in folder, compare and copy rows based on list
    By MusicMan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-19-2019, 11:36 AM
  4. [SOLVED] Compare sentense between 2 excel files and find match cell.
    By amein in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-28-2016, 12:45 AM
  5. [solved] how to compare part number lead times from 2 different files/worksheets
    By stevenressler in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-04-2014, 05:18 PM
  6. Replies: 4
    Last Post: 02-17-2011, 08:29 AM
  7. [SOLVED] Time Format in VBA doesn't match Excel display
    By LabElf in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-27-2005, 09:05 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