+ Reply to Thread
Results 1 to 7 of 7

Searching a matrix to signal duplicate rows

  1. #1
    Registered User
    Join Date
    06-04-2019
    Location
    Pittsburgh
    MS-Off Ver
    2016
    Posts
    3

    Exclamation Searching a matrix to signal duplicate rows

    Greetings everyone!

    Background:
    I had a spreadsheet sent my way where I need to modify the existing format. See the attached image for general layout. The function of this sheet is to use a matrix to generate part number suffixes for the series of selected options. This is used for expanding normal part number scheme for custom jobs. The spreadsheet grows over time so the solution to my issue needs to be expandable. What I mean by this is that options can be added, and every time a project comes about with a new combination, a row will be added. As you can see, the combinations have been marked with a highlighted yellow cell with an x. I.E. excel row 23 has the part number suffix A21, and has option1, option5, and option9 selected.

    Problem:
    What I wish to accomplish is having a way to ensure a duplicate combination of options cannot be created for a new part number suffix, or if a duplicate combination is entered, it is signaled somehow. I wish to do this in a way where there is minimal impact to the current format.

    I greatly appreciate input!

    ExcelCapture.PNG

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Searching a matrix to signal duplicate rows

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    06-04-2019
    Location
    Pittsburgh
    MS-Off Ver
    2016
    Posts
    3

    Re: Searching a matrix to signal duplicate rows

    See the attached workbook. The AFTER tab has a new entry in row 51 that duplicates row 50's options. I propose that the part numbers turn red if the options are duplicated. Let me know if there is a better signal that can be integrated.
    Attached Files Attached Files

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Searching a matrix to signal duplicate rows

    Hello and welcome to the forum.

    This is a bit of a brute force approach but it'll work.

    Create a helper column (can be anywhere) using this formula:
    =D$1&D2&E$1&E2&F$1&F2&G$1&G2&H$1&H2&I$1&I2&J$1&J2&K$1&K2&L$1&L2&M$1&M2&N$1&N2&O$1&O2&P$1&P2&Q$1&Q2&R$1&R2
    I put this in column S starting in row 2.

    Highlight C2:C51 > Conditional Formatting > New Rule > Use a formula
    =AND(COUNTIF(D2:R2,"x")>0,COUNTIF(S$2:S2,S2)>1)
    Format: Red Font > OK > OK

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Searching a matrix to signal duplicate rows

    If you want something a little more "in your face", you can make the whole row go red.

    To do this, after putting the helper column into column S, you can highlight C2:R51 and use this formula:
    =AND(COUNTIF($D2:$R2,"x")>0,COUNTIF($S$2:$S2,$S2)>1)
    Format: Red Fill > OK > OK

  6. #6
    Registered User
    Join Date
    06-04-2019
    Location
    Pittsburgh
    MS-Off Ver
    2016
    Posts
    3

    Re: Searching a matrix to signal duplicate rows

    That is certainly a brute force method, but my initial test of it worked. Thank you!

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Searching a matrix to signal duplicate rows

    You're welcome. Happy to help.

    If that takes care of your original question, please select 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. [SOLVED] VBA - Searching for a value in a matrix table
    By Remco Verdaasdonk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2019, 05:25 AM
  2. Replies: 2
    Last Post: 02-11-2014, 05:05 AM
  3. Searching a matrix
    By jcbbaird in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-12-2013, 12:16 PM
  4. [SOLVED] Removing duplicate headers from a matrix
    By guest2013 in forum Excel General
    Replies: 6
    Last Post: 08-23-2013, 10:54 AM
  5. Searching in a matrix
    By Thnis in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-27-2012, 06:37 AM
  6. Matrix searching
    By Lionzz in forum Excel General
    Replies: 4
    Last Post: 09-12-2007, 07:41 PM
  7. Searching for data in a matrix
    By I Maycotte in forum Excel General
    Replies: 2
    Last Post: 08-16-2006, 07:56 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