+ Reply to Thread
Results 1 to 6 of 6

Delete duplicates but keep rows

  1. #1
    Registered User
    Join Date
    07-05-2018
    Location
    wigan
    MS-Off Ver
    2010
    Posts
    10

    Delete duplicates but keep rows

    Hi,

    Apologies if already answered I can't figure out how or if this can be done a bit easier than I already am doing. I have found some vb code but the code I have I would need to do each column. So my problem is I need to delete duplicates in a table but keep the rows, to explain/show better below are screenshots of what I mean -

    The table I have -
    1.png

    And I need it to look like below -
    2.png

    As you can see I need to keep rows in column D that are all unique values whilst deleting/clearing the adjacent cells and keeping the top row of each unique row of data, if that makes sense.

    Thanks.
    Attached Images Attached Images

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Delete duplicates but keep rows

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  3. #3
    Registered User
    Join Date
    07-05-2018
    Location
    wigan
    MS-Off Ver
    2010
    Posts
    10

    Re: Delete duplicates but keep rows

    Ok no problem, I have attached the spreadsheets
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Delete duplicates but keep rows

    A few formulae (each shade = different formula, copied down or across/down):

    =IF(Sheet1!A2="","",IF(COUNTIF(Sheet1!A$2:A2,Sheet1!A2)>1,"",Sheet1!A2))

    =IF($A2="","",Sheet1!B2)

    and so on
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-05-2018
    Location
    wigan
    MS-Off Ver
    2010
    Posts
    10

    Re: Delete duplicates but keep rows

    Cheers for that, worked a treat!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Delete duplicates but keep rows

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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 Two Rows and Delete Row
    By trevor2524 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-25-2014, 09:16 PM
  2. Macro To Find Rows With Duplicates, Compare Cells, And Delete Rows. - Excel
    By Kwame001 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-26-2013, 10:41 AM
  3. [SOLVED] Keep duplicates but delete unique rows
    By Adam845 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-03-2012, 02:21 PM
  4. Replies: 13
    Last Post: 08-23-2011, 11:00 AM
  5. Filter rows and delete duplicates
    By lunautic in forum Excel General
    Replies: 5
    Last Post: 04-07-2010, 05:20 PM
  6. Delete rows with duplicates
    By EJensen in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-04-2009, 04:35 PM
  7. Rows to columns and delete duplicates
    By msick in forum Excel General
    Replies: 0
    Last Post: 04-19-2005, 09:53 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