+ Reply to Thread
Results 1 to 4 of 4

kEEP NEWEST ROWS AND DELETE OLDEST ONE IF

  1. #1
    Forum Contributor
    Join Date
    06-01-2017
    Location
    Santos
    MS-Off Ver
    Office 2016 - Windows 7
    Posts
    105

    Lightbulb kEEP NEWEST ROWS AND DELETE OLDEST ONE IF

    Dears good afternoon

    I would like to kindly ask, if someone can help me to create a vba to do the following operation :
    Base on the number on column "H", I need to find on column "V" what is the newest date and then delete the others (the oldest one)

    I have actually a sheet with 66000 rows and I need to delete what i do not need.
    File attached, I have 96 rows for the same number on column "H".
    After deleting the oldest entries in column "V" it will remain only 16 rows

    If some can help me, I will be very grateful

    In advance thank you
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-01-2017
    Location
    Santos
    MS-Off Ver
    Office 2016 - Windows 7
    Posts
    105

    Re: kEEP NEWEST ROWS AND DELETE OLDEST ONE IF

    Updating.
    I found a code that can meet my request but it is still missing things :

    Please Login or Register  to view this content.
    This code is good but I need to improve it.
    I need :
    * to consider booking (H) AND container Number (I) AND Seq Number (A)

    Actually the code is only considering the booking number (H)

    If someone can help me I will be grateful
    Regards

  3. #3
    Forum Contributor
    Join Date
    06-01-2017
    Location
    Santos
    MS-Off Ver
    Office 2016 - Windows 7
    Posts
    105

    Re: kEEP NEWEST ROWS AND DELETE OLDEST ONE IF

    up on this post.
    I tried several ways this week end but found nothing.
    Can someone help me ?

    In advance thank you

  4. #4
    Forum Contributor
    Join Date
    06-01-2017
    Location
    Santos
    MS-Off Ver
    Office 2016 - Windows 7
    Posts
    105

    Re: kEEP NEWEST ROWS AND DELETE OLDEST ONE IF

    Dears good morning,

    Would like to inform you that I found a solution.
    Let me explain it.

    My first problem was to find a way to consider three values.
    What I did, was to concatenate all the information.

    Once I had the concatenate, I was able to use a macro (see below).
    The following do the following thing :
    * Filtering columns, find duplicate values in the concatenate and then delete all the oldest value (based on the date)

    Please Login or Register  to view this content.
    I hope it will help some one.
    thank you anyway

    Regards

+ 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] Oldest and Newest Date based on 2 Criteria
    By MRozell in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-21-2017, 12:19 PM
  2. Unable to sort dates by oldest to newest
    By probuddha in forum Excel General
    Replies: 8
    Last Post: 06-25-2016, 08:27 AM
  3. Filter not working when sheet's protected
    By andyzz in forum Excel General
    Replies: 2
    Last Post: 07-22-2014, 10:51 PM
  4. [SOLVED] Sort dates in column from oldest to newest...
    By ILoveYouExcel in forum Excel General
    Replies: 2
    Last Post: 06-11-2014, 02:11 PM
  5. Arranging Pivot table data from Newest to oldest to Newest does not appear
    By paradise2sr in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-08-2014, 06:53 AM
  6. Top ten oldest and top ten newest
    By jhiltabidel in forum Excel General
    Replies: 11
    Last Post: 07-08-2011, 04:59 PM
  7. oldest to newest
    By Hidai in forum Excel General
    Replies: 5
    Last Post: 01-10-2011, 12:14 PM

Tags for this Thread

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