+ Reply to Thread
Results 1 to 3 of 3

VBA fill blanks if duplicate and delete old row of duplicates

  1. #1
    Registered User
    Join Date
    12-05-2016
    Location
    Valencia, Spain
    MS-Off Ver
    2016
    Posts
    2

    VBA fill blanks if duplicate and delete old row of duplicates

    I work with a long table and find myself having to repeat this operation weekly.
    I don't know much programming and would appreciate some help.

    Whenever I receive an update and add new info to the table I need to delete the old duplicates but keep the number in the first column. What I do manually is to order the name alphabetically, search for the blank cells in the first column, check if the cell to the right has a duplicate, copy the number in the first row into the blank and delete the old row.
    I'm uploading an image of the original and desired results.

    table-1.jpg

    I know there is VBA code to find and fill blanks using IsEmpty but I am not able to add a second condition that checks for duplicates, and then deletes the old row.

    Thanks for any help you can provide.

  2. #2
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: VBA fill blanks if duplicate and delete old row of duplicates

    In case your data after update and sorting always looks like on attached picture, may be this will help
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-05-2016
    Location
    Valencia, Spain
    MS-Off Ver
    2016
    Posts
    2

    Re: VBA fill blanks if duplicate and delete old row of duplicates

    Nice, kasan! It works perfectly. Thanks

+ 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] Find Duplicates in column and then based on row criteria delete the row of that Duplicate
    By bobberuk in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-23-2016, 01:56 PM
  2. [SOLVED] Search for duplicates in two sheets, and delete row if duplicate
    By vonrainer in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-25-2014, 05:43 AM
  3. [SOLVED] Delete,sum duplicates - duplicate based on multiple cell match
    By spikerush2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-04-2014, 01:53 PM
  4. Vlookup with duplicate check and auto fill on duplicates
    By vjmcdonnell in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-13-2013, 11:14 AM
  5. Count duplicate rows then delete duplicates
    By dougf in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-26-2013, 04:13 PM
  6. Replies: 0
    Last Post: 11-15-2012, 06:47 AM
  7. Delete Duplicates based on 2 criteria 1st Acutal duplicate 2ND PREVIOUS DATE
    By xcruc1at3r in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2011, 09:09 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