+ Reply to Thread
Results 1 to 8 of 8

Deleting rows of data based on time stamp

  1. #1
    Registered User
    Join Date
    06-12-2008
    Posts
    29

    Deleting rows of data based on time stamp

    Hello,
    Can I please get some help with a macro, The keys for me are column A and column C.

    Row 2 and row 3 have the same unit number whenever this is identified look at column C and only keep the row with the most current time. In this example row 3 would be kept and row 2 deleted from the spreadsheet.

    My spreadsheet will have up to 100000 rows of data. Thank you all.

    Tried to attach a spreadsheet hope I did it correctly.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Deleting rows of data based on time stamp

    We suppose that the unit number are not sorted ..?
    Can we sort them?
    "look at column C " and B is it?
    Last edited by PCI; 05-28-2015 at 01:15 PM.
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Deleting rows of data based on time stamp

    If you sort your list by Column C then A, you can just keep your first batch and delete everything else.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Deleting rows of data based on time stamp

    See attached
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-12-2008
    Posts
    29

    Re: Deleting rows of data based on time stamp

    Hello, you don't know how much I appreciate your help. I do have a follow up question thougth. I just saw in some data that I was reviewing that the date/time may not be a few seconds off like in the initial example.

    With the spreadsheet you provided to me will the macro still keep the most recent item if data looks like what is in the table below, where the second date is three days later than the first date but the time on 5/4/15 is actually earlier than the time on 5/1/15. Hope that makes sense.

    Unit 1 5/1/2015 17:00:40 A 71.907
    Unit 1 5/4/2015 15:23:56 A 264.216

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Deleting rows of data based on time stamp

    In the macro sent it is not only the time but the day + time which is used
    Try and comment
    Please give the information back concerning the treatment time

  7. #7
    Registered User
    Join Date
    06-12-2008
    Posts
    29

    Re: Deleting rows of data based on time stamp

    Thank you. I manipulated the data for date / time and ran the macro and it works great. Thank you again for your help.

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Deleting rows of data based on time stamp

    What about the time spent, for example with 100000 rows, is it acceptable ?

+ 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 to highlight rows based on latest time stamp
    By rjagini in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 08-13-2012, 03:31 PM
  2. [SOLVED] Please Help - Trying to convert 1-2 sec data to a 5 minute Average based on time stamp -
    By elyk1173 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-31-2012, 10:34 AM
  3. Excel 2007 : HELP - Deleting rows based on unique data
    By mikedakota43 in forum Excel General
    Replies: 1
    Last Post: 06-23-2011, 02:10 AM
  4. Deleting Rows Based on Specific Data
    By Jakz34 in forum Excel General
    Replies: 1
    Last Post: 04-12-2011, 09:00 PM
  5. Averaging Data based on date / time stamp
    By liverpoolphil in forum Excel General
    Replies: 3
    Last Post: 10-15-2009, 09:18 AM

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