+ Reply to Thread
Results 1 to 24 of 24

Find Duplicate and variation

  1. #1
    Forum Contributor
    Join Date
    02-29-2012
    Location
    UK, Newcastle
    MS-Off Ver
    Office 365
    Posts
    131

    Find Duplicate and variation

    Hi all, I have a sheet with a list of part numbers with revision. When adding a new part number I would like the column to be checked for the same part number already entered above or same part number with a different revision.
    I would like the result to be displayed in the next column to the part number and indicated by changing the colour of the cell only.

    So in attached example row 235 would be an exact duplicate of row 233 and should should therefore fill 235 COL B RED.
    Row 236 is a partial match (everything before the /) and therefore should fill 236 COL B YELLOW.

    It would also be acceptable to have the COL B show DUP for an exact duplicate or REV for same entry before the /


    Hope this makes sense.


    Quick Edit. Not against the removing COL B and simply having the cell with the duplication in it coloured red for exact duplication and yellow for duplication with exception of data beyond the /.

    I know there is a duplication function which would work for the exact but require both.


    Note I have posted this in Formulas and functions as believe this will be required but not 100% sure.





    Many thanks


    23042025.JPG
    Last edited by maax555; 04-23-2025 at 11:10 AM. Reason: Solved

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    As advised in the yellow banner at the top of this page, providing a sample workbook is a good idea.

    HOW TO ATTACH YOUR SAMPLE WORKBOOK: Fast answers need clear examples. Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen. Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    So, while I am waiting for you to provide a sample workbook, please clarify if ALL duplicates should be RED, or just those that appear AFTER the original entry. Same for revisions.

    You can mock up manually what you want in the sample workbook.

  4. #4
    Forum Contributor
    Join Date
    02-29-2012
    Location
    UK, Newcastle
    MS-Off Ver
    Office 365
    Posts
    131

    Re: Find Duplicate and variation

    Hi thanks for quick response. Apologies as I didn't think an example would provide any more detail than the already given data.
    I think all duplicates should go red for simplicity, same for revisions, thanks.

    Please find attached example

    Thanks Again.ExampleRMB.xlsx

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

    Re: Find Duplicate and variation

    You provide a sample workbook so that your helpers don't have to replicate your data (amongst other reasons): you have it, so save us time and share it!

    I'll have a look.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    CF rules for B1:

    =AND($A1<>"",COUNTIF($A$1:$A$8,$A1)>1) (for RED)
    =AND($A1<>"",SUMPRODUCT((TEXTBEFORE($A$1:$A$8,"/",-1)=TEXTBEFORE($A1,"/",-1))*1)>1) (for YELLOW)

    Make sure the rules are in this order, or YELLOW will override RED.
    Attached Files Attached Files

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

    Re: Find Duplicate and variation

    Any questions?

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    Seen and gone without any acknowledgement ...

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  9. #9
    Forum Contributor
    Join Date
    02-29-2012
    Location
    UK, Newcastle
    MS-Off Ver
    Office 365
    Posts
    131

    Re: Find Duplicate and variation

    Many thanks Ali, this works perfectly in the file you supplied. However (and perhaps I should have mentioned this ) I already have some conditional formatting in my sheet. I assumed if I added this to the bottom it would override and work as intended.
    Also in my sheet the data starts from A4. I assumed I would simply edit to suit. I changed the A$8 to 999 to cover the current length of my sheet but don't think that has had any negative effect.
    So I think I should mark this as solved, then create a new query and link to this. Would that be correct or should I upload here my actual sheet I am trying to apply this too.
    Apologies again as I thought it would be a simple cut, paste and edit job.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    No - you should continue here.

    Provide a more realistic sample file.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    So based on what you've said, you would need these rules for B8:

    =AND($A8<>"",COUNTIF($A$8:$A$999,$A8)>1) (for RED)
    =AND($A8<>"",SUMPRODUCT((TEXTBEFORE($A$8:$A$999,"/",-1)=TEXTBEFORE($A8,"/",-1))*1)>1) (for YELLOW)

    You'd then apply these to: $B$8:$B$999.

    Youi'd move the rules to the top of your rule list, with red on top and yellow second.

  12. #12
    Forum Contributor
    Join Date
    02-29-2012
    Location
    UK, Newcastle
    MS-Off Ver
    Office 365
    Posts
    131

    Re: Find Duplicate and variation

    Many thanks and again my apologies.rmb2.xlsx

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    CF rules for B4:

    =AND($A4<>"",COUNTIF($A$4:$A$999,$A4)>1)
    =AND($A4<>"",SUMPRODUCT((IFERROR(TEXTBEFORE($A$4:$A$999,"/",-1),0)=IFERROR(TEXTBEFORE($A4,"/",-1),0))*1)>1)

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Attached Files Attached Files

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    Gone again without any feedback ...

    Did it work this time? Are you happy? Any feedback for your helper at all?

  15. #15
    Forum Contributor
    Join Date
    02-29-2012
    Location
    UK, Newcastle
    MS-Off Ver
    Office 365
    Posts
    131

    Re: Find Duplicate and variation

    Many thanks, However on the downloaded sheet you have provided, entering a unique part number gives a yellow result.

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    OK - it worked in the example file you gave.

  17. #17
    Forum Contributor
    Join Date
    02-29-2012
    Location
    UK, Newcastle
    MS-Off Ver
    Office 365
    Posts
    131

    Re: Find Duplicate and variation

    No, I downloaded the sheet you provided at 02:43 and when entering any unique part number the cell turned yellow. As per your previous sheet, this should stay white and only turn yellow if the part number prior to the / is the same.

    The conditional formatting I already had in place still worked only the cell in COL B was changing to yellow when it should not.
    Last edited by AliGW; 04-23-2025 at 10:57 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead. Please review the forum guidelines.

  18. #18
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    I don't have any more time to spend on it at the momwent - sorry.

  19. #19
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    A quick guess:

    =AND($A4<>"",SUMPRODUCT((IFERROR(TEXTBEFORE($A$4:$A$999,"/",-1),0)=TEXTBEFORE($A4,"/",-1))*1)>1)

    If this is right, please tell me and sign off the thread. If it's not, I'm not able to help any more until probably tomorrow.
    Attached Files Attached Files

  20. #20
    Forum Contributor
    Join Date
    02-29-2012
    Location
    UK, Newcastle
    MS-Off Ver
    Office 365
    Posts
    131

    Re: Find Duplicate and variation

    No Problem. Your help was very much appreciated. I think it is if a part number is entered without the /. This is sometimes the case as we dont always know the /revision. However I can work around this by simply adding a slash without a revision or an*.

    So all is good.

    thanks again.

  21. #21
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    See post #19.

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

    Re: Find Duplicate and variation

    Are we there yet? Hopefully that final tweak works.

  23. #23
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,920

    Re: Find Duplicate and variation

    Gone again. Well, I presume that means it works.

    If you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  24. #24
    Forum Contributor
    Join Date
    02-29-2012
    Location
    UK, Newcastle
    MS-Off Ver
    Office 365
    Posts
    131

    Re: Find Duplicate and variation

    Many thanks, very much appreciated.

+ 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. Ways to find the variation in a set of values
    By Akarty in forum Excel General
    Replies: 5
    Last Post: 05-13-2020, 08:16 PM
  2. [SOLVED] Duplicate variation in current scope
    By Pod25 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2017, 04:03 PM
  3. [SOLVED] Duplicate variation in current scope
    By Pod25 in forum Excel General
    Replies: 1
    Last Post: 02-04-2017, 02:44 PM
  4. Replies: 7
    Last Post: 03-20-2016, 12:06 PM
  5. [SOLVED] How to find the Variation between two sheets....
    By bsaimsc in forum Excel General
    Replies: 5
    Last Post: 09-11-2013, 07:01 AM
  6. Find Replace Variation
    By ikevinax in forum Excel General
    Replies: 3
    Last Post: 08-31-2012, 10:24 AM
  7. How to find the variation between two numbers
    By Snaggles in forum Excel General
    Replies: 4
    Last Post: 10-14-2011, 03:35 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