+ Reply to Thread
Results 1 to 15 of 15

Identify duplicates of two columns combined

  1. #1
    Registered User
    Join Date
    01-12-2024
    Location
    Mason, Ohio
    MS-Off Ver
    2021
    Posts
    7

    Identify duplicates of two columns combined

    Problem statement - There are multiple departments and a particular software can be used in more than one department. In this case S1 is being used by Dept A and Dept B. I need to identify such softwares. I can't use the inbuilt duplicate function because that will also highlight S1 version B also being used. Also it will highlight S3 as it's different versions are being used by the same department Dept B. So in this case it should just highlight S1 as it is being used by 2 different departments. The requirement is to find the same software being used by more than 1 department. Have tried Vlookup but no luck.[ATTACH]855598[/ATTACH
    Attached Files Attached Files
    Last edited by pratikkhanna; 01-13-2024 at 09:45 AM.

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

    Re: Identify duplicates of two columns combined

    You didn't show an example of what you wanted for a result, so here is a formula that puts DUPLICATE in column D when both columns B and C together are duplicated.
    In D2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    copy down

    Values as displayed
    A
    B
    C
    D
    1
    Department
    Software
    Version
    2
    Dept A
    S1
    a
    DUPLICATE
    3
    Dept B
    S1
    a
    DUPLICATE
    4
    Dept C
    S2
    a
    5
    Dept A
    S1
    b
    6
    Dept B
    S3
    a
    7
    Dept C
    S4
    b
    8
    9


    Underlying formulas
    A
    B
    C
    D
    1
    Department
    Software
    Version
    2
    Dept A
    S1
    a
    =IF(COUNTIFS($B:$B,$B2,$C:$C,$C2)>1,"DUPLICATE","")
    3
    Dept B
    S1
    a
    =IF(COUNTIFS($B:$B,$B3,$C:$C,$C3)>1,"DUPLICATE","")
    4
    Dept C
    S2
    a
    =IF(COUNTIFS($B:$B,$B4,$C:$C,$C4)>1,"DUPLICATE","")
    5
    Dept A
    S1
    b
    =IF(COUNTIFS($B:$B,$B5,$C:$C,$C5)>1,"DUPLICATE","")
    6
    Dept B
    S3
    a
    =IF(COUNTIFS($B:$B,$B6,$C:$C,$C6)>1,"DUPLICATE","")
    7
    Dept C
    S4
    b
    =IF(COUNTIFS($B:$B,$B7,$C:$C,$C7)>1,"DUPLICATE","")
    8
    =IF(COUNTIFS($B:$B,$B8,$C:$C,$C8)>1,"DUPLICATE","")
    9
    =IF(COUNTIFS($B:$B,$B9,$C:$C,$C9)>1,"DUPLICATE","")
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-12-2024
    Location
    Mason, Ohio
    MS-Off Ver
    2021
    Posts
    7

    Re: Identify duplicates of two columns combined

    Yes the solve should be another column mentioning duplicates. But the version may not always be same in other department. I just reuploaded the XLS after making this change.

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

    Re: Identify duplicates of two columns combined

    In the later version of the your file there are no duplicates, because the Version is different in all cases. If that is not correct, you need to explain in more detail what you are looking for. You should show desired results.

  5. #5
    Registered User
    Join Date
    01-12-2024
    Location
    Mason, Ohio
    MS-Off Ver
    2021
    Posts
    7

    Re: Identify duplicates of two columns combined

    Thanks, I have uploaded the file again with the desired results and trying to summarize the requirement here -
    1. Probably the word duplicate is interpreted differently so I have used the word Shared in my XLS
    2. Since software S1 is shared between Dept A and B, that is what the 4th column should mark. This is irrespective of the version.
    3. S3 also comes twice, but it's being used by the same Dept(different versions), so should not be marked.

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Identify duplicates of two columns combined

    Please try in D2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-12-2024
    Location
    Mason, Ohio
    MS-Off Ver
    2021
    Posts
    7

    Re: Identify duplicates of two columns combined

    Its should not show Shared in row number 6 as the Department is the same. Only for different Dept's it should mark it as Shared. If you have already marked Shared for Dept A - S1 combination (Any version), don't need to mark it again for a different version

  8. #8
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,022

    Re: Identify duplicates of two columns combined

    Try this in D2 and copy down.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Identify duplicates of two columns combined

    I don't understand you.

    S1 in row 6 is not only used by DEPT A,
    S1 is also used by DEPT B.

    See row 3.

  10. #10
    Registered User
    Join Date
    01-12-2024
    Location
    Mason, Ohio
    MS-Off Ver
    2021
    Posts
    7

    Re: Identify duplicates of two columns combined

    hansDouwe : There are 2 instances of Dept A + S1 combination: Row 2 and row 6. Both of them should not show as Shared. Once Row2 tells me that this is shared with another Dept, in this case Dept B. I don' t need that count again in Row6.

  11. #11
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Identify duplicates of two columns combined

    In that case try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    01-12-2024
    Location
    Mason, Ohio
    MS-Off Ver
    2021
    Posts
    7

    Re: Identify duplicates of two columns combined

    This works in the example which I shared, but this actually needs to be applied to ~9000 rows. When I did that, it's returning blank for Shared rows. I debugged it further and pls see the attached error #N/A. This is how I modified the formula:

    =IF(COUNTA(UNIQUE(FILTER($A$2:$A$8695,$F$2:$F$8695=F25)))>1,IF(MATCH(A25&F25,$A$2:$A$8695&$F$2:$F$8695,0)=ROW()-1,"Shared",""),"")
    Attached Images Attached Images

  13. #13
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Identify duplicates of two columns combined

    About the error, please upload a sample file and show the error.

    And does Post #11 the job?

  14. #14
    Registered User
    Join Date
    01-12-2024
    Location
    Mason, Ohio
    MS-Off Ver
    2021
    Posts
    7

    Re: Identify duplicates of two columns combined

    Seems like that a data issue : This worked : =IF(COUNTA(UNIQUE(FILTER($A$2:$A$8695,$F$2:$F$8695=F25)))>1,IF(MATCH(A25&F25,$A$2:$A$8695&$F$2:$F$8695,0)=ROW()-1,"Shared",""),"")

    Thanks windknife and HansDouwe!!

  15. #15
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,022

    Re: Identify duplicates of two columns combined

    You are welcome.
    --------------------------------------
    If that takes care of your original question, please click on "Thread Tools" from the menu link above and mark this thread as SOLVED.

+ 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. Best Formula Advice
    By CarlW1179 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-05-2024, 06:35 AM
  2. Need formula advice
    By kikis in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-26-2015, 06:14 AM
  3. VBA code advice/Excel advice for summing groups of numbers
    By paulblower in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2014, 05:47 AM
  4. IF Formula advice
    By jkility in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-12-2014, 11:23 AM
  5. Formula Advice
    By max308 in forum Excel General
    Replies: 7
    Last Post: 09-07-2011, 01:53 PM
  6. [SOLVED] need formula advice
    By CdnMichael in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-23-2006, 07:20 PM
  7. [SOLVED] Advice on formula Please
    By Tempy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-24-2005, 02:06 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