+ Reply to Thread
Results 1 to 14 of 14

I am wanting to highlight a row if it matches another row in the sheet

  1. #1
    Registered User
    Join Date
    09-29-2014
    Location
    Lexington, KY
    MS-Off Ver
    Pro + 2016
    Posts
    10

    I am wanting to highlight a row if it matches another row in the sheet

    I work on security access control systems, and we have a customer who has 94 access levels (that's insane). I'm working on a spreadsheet that shows which doors are on each access level and want to do conditional formatting if 1 row matches another row exactly. I would like to have different colors for different sets of matching rows, if possible. Can anyone walk me through it? I can post the sheet if needed, but I'm still working on it. 94 access levels at 4 doors per module and 7 modules is turning out to be a lot of data entry. access_levels.xlsx

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: I am wanting to highlight a row if it matches another row in the sheet

    Hi, welcome to the forum

    Based on your workbook, could you show a few sample answers?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    09-29-2014
    Location
    Lexington, KY
    MS-Off Ver
    Pro + 2016
    Posts
    10

    Re: I am wanting to highlight a row if it matches another row in the sheet

    Thanks! I used to be on excelhelpforum.com but I couldn't find it today.

    As far as showing example answers, I'm not sure there are any yet. There is only 1 access level allowed per user, and if the customer wants to give each person access to just certain doors, and every person has a different set of doors, it could result in many access levels, but I have a feeling there IS some overlap.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: I am wanting to highlight a row if it matches another row in the sheet

    ok well could you dummy 1 up so we know what we are dealing with?

    And umm did you want 90+ (thing you said) different CF rules and colors???

  5. #5
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: I am wanting to highlight a row if it matches another row in the sheet

    modules screen.png

    Would it be any easier to add info via a form? (see above)
    Just click the items and it will add to the count.

  6. #6
    Registered User
    Join Date
    09-29-2014
    Location
    Lexington, KY
    MS-Off Ver
    Pro + 2016
    Posts
    10

    Re: I am wanting to highlight a row if it matches another row in the sheet

    Quote Originally Posted by FDibbins View Post
    ok well could you dummy 1 up so we know what we are dealing with?

    And umm did you want 90+ (thing you said) different CF rules and colors???
    See attached. Of the bottom 3 rows, the first 2 are identical, with the very bottom row being slightly different, but different enough to matter. If there are no other matching rows, I would not expect any different formatting. I mostly want to highlight anything that is EXACTLY the same.

    :::EDIT::: I realized that Module 7 was added on after some of these levels were made, so if any line is identical except for module 7, it COULD be considered a valid duplicate. (would be a duplicate if x=0 (0=no access) but not a duplicate if x=:anything otehr than 0:. x is simply a placeholder for a blank.)

    access_levels_test.xlsx
    Last edited by savage16; 09-29-2014 at 04:58 PM.

  7. #7
    Registered User
    Join Date
    09-29-2014
    Location
    Lexington, KY
    MS-Off Ver
    Pro + 2016
    Posts
    10

    Re: I am wanting to highlight a row if it matches another row in the sheet

    I am already pulling this data from a form of sorts. This data is being pulled from a live access control panel. The customer is wanting to reduce the amount of options when adding a user to the system.

    A little more background: each one of these rows represents an "access level". An access level defines which doors a user is allowed access to at which time of day. If you notice, some rows look almost the same, but instead of a 1, it might have a 3. The difference is 24 hour access to the door instead of M-F 8AM-6PM. I used numbers to represent the time frames because it's easier/faster than typing out exactly what each number means.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: I am wanting to highlight a row if it matches another row in the sheet

    OK, I think I have something that you may be able to use.

    1. create a helper column to the right of your data (I used AM) and copy this down...
    =D3&E3&F3&G3&H3&I3&J3&K3&L3&M3&N3&O3&P3&Q3&R3&S3&T3&U3&V3&W3&X3&Y3&Z3&AA3&AB3&AC3&AD3&AE3&AF3&AG3&AH3&AI3&AJ3&AK3&AL3

    Then for the CF, highlight your range that you want colored, select New Rule/Use Formula, and paste this in...
    =COUNTIF($AM$3:$AM$26,$AM3)>1
    format fill red (or your color)
    adjust the bolded part as needed for your range

  9. #9
    Registered User
    Join Date
    09-29-2014
    Location
    Lexington, KY
    MS-Off Ver
    Pro + 2016
    Posts
    10

    Re: I am wanting to highlight a row if it matches another row in the sheet

    Quote Originally Posted by FDibbins View Post
    OK, I think I have something that you may be able to use.

    1. create a helper column to the right of your data (I used AM) and copy this down...
    =D3&E3&F3&G3&H3&I3&J3&K3&L3&M3&N3&O3&P3&Q3&R3&S3&T3&U3&V3&W3&X3&Y3&Z3&AA3&AB3&AC3&AD3&AE3&AF3&AG3&AH3&AI3&AJ3&AK3&AL3

    Then for the CF, highlight your range that you want colored, select New Rule/Use Formula, and paste this in...
    =COUNTIF($AM$3:$AM$26,$AM3)>1
    format fill red (or your color)
    adjust the bolded part as needed for your range

    this is not working for me. Am I doing something wrong? access_levels_test_withCF.xlsx

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: I am wanting to highlight a row if it matches another row in the sheet

    1ST, change the CF formula to what I suggested...
    =COUNTIF($AM$3:$AM$26,$AM3)>1
    You have a strange ref in place of the $AM3

    Then for the Applies To range, instead of a bunch of separate ranges, just use this...
    =$A$3:$AL$26

  11. #11
    Registered User
    Join Date
    09-29-2014
    Location
    Lexington, KY
    MS-Off Ver
    Pro + 2016
    Posts
    10

    Re: I am wanting to highlight a row if it matches another row in the sheet

    Ah, its working now. Thanks

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: I am wanting to highlight a row if it matches another row in the sheet

    great, glad we got it working for you

  13. #13
    Registered User
    Join Date
    09-29-2014
    Location
    Lexington, KY
    MS-Off Ver
    Pro + 2016
    Posts
    10

    Re: I am wanting to highlight a row if it matches another row in the sheet

    LOL, Formula and formatting work great with an example, but in the working spreadsheet, none of them are highlighted yet, meaning no duplicates. I think I will manipulate it slightly.

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: I am wanting to highlight a row if it matches another row in the sheet

    OK well the helper is combining all the cells, and the CF is testing for a count of those combos >1. If you find some that you know (or think?) that match (but still count 1), compare them closely, look for leading/trailing spaces.

    As a test, you can put that countif() formula in another helper cell and copy down...it will do the same thing, just give a TRUE/FALSE answer

+ 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. Replies: 3
    Last Post: 03-04-2014, 01:00 PM
  2. Replies: 6
    Last Post: 07-02-2013, 10:29 AM
  3. Highlight column matches
    By joeyga in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-03-2013, 11:11 PM
  4. Wanting to display group name from another sheet
    By kevinmbarnard in forum Excel General
    Replies: 1
    Last Post: 09-09-2010, 10:52 PM
  5. Replies: 6
    Last Post: 04-21-2009, 07: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