+ Reply to Thread
Results 1 to 8 of 8

Removing Duplicates leaving Blank cells

  1. #1
    Registered User
    Join Date
    02-01-2024
    Location
    FL
    MS-Off Ver
    365
    Posts
    2

    Removing Duplicates leaving Blank cells

    I have a data set that carries over from SAP that has duplicates in several different columns.

    example below is how it pulls in and the desired outcome.

    please advise the data set is huge and doing it manually is not an option

    Book1 duplicates.xlsx

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Removing Duplicates leaving Blank cells

    Do you want the cells to actually be blank? Or just not see the contents? You could use conditional formatting to make the font white.

    Also you will need to be more specific about what you mean by "duplicate." In columns D and F there are duplicates that are visible.

    In this small sample, for any given "Maintenance Plan" (column A) number, the values in columns B:E are the same. Is that true of all your data?

    I have attached the CF solution just to illustrate what I'm talking about. It requires the data to be grouped by Maintenance Plan number.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Removing Duplicates leaving Blank cells

    You could easily do it with Pivot Table, no need for code or formula.
    See attached file.
    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,063

    Re: Removing Duplicates leaving Blank cells

    DELETE all expected results. Formula:

    =LET(A,'source data'!A2:J9,B,SCAN(0,INDEX(A,,7),LAMBDA(x,y,COUNTIF('source data'!G2:y,y))),HSTACK(IF(B=1,TAKE(A,,5),""),TAKE(A,,-5)))

    No copy/paste needed.


    IF your dataset REALLY is vast and the formula is slow a much more complicated-looking alternative is possible. Let me know.
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 02-02-2024 at 04:25 AM.
    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

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Removing Duplicates leaving Blank cells

    example below is how it pulls in and the desired outcome.
    As an aside, your desired outcome is NOT good data organisation and may well lead to issues later when trying to use data from this table. The normalised layout you don't want is far more robust.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    02-01-2024
    Location
    FL
    MS-Off Ver
    365
    Posts
    2

    Re: Removing Duplicates leaving Blank cells

    agreed if the data was being used other than for visual reference it would cause issues.

    this is more of a quick reference sheet for individuals that are more familiar with excel then SAP ( almost a guide)

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Removing Duplicates leaving Blank cells

    Still, you'd be better off hiding unwanted data using conditional formatting than not having it there at all. But it's your choice!

  8. #8
    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,063

    Re: Removing Duplicates leaving Blank cells

    So, does it (Post 4) do what you wanted, or not?

+ 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. removing duplicates leaving a set amount
    By n2ban in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-07-2021, 01:26 PM
  2. Removing duplicates but leaving values if from another sequence
    By ttony123 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-19-2018, 04:49 PM
  3. Replies: 11
    Last Post: 09-15-2014, 02:36 AM
  4. [SOLVED] Remove duplicates without removing cells (leave blank)
    By RobertOHare in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-10-2013, 09:57 AM
  5. Replies: 8
    Last Post: 01-28-2013, 01:10 AM
  6. Replies: 2
    Last Post: 09-09-2010, 03:26 PM
  7. Replies: 3
    Last Post: 11-28-2005, 02:00 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