+ Reply to Thread
Results 1 to 4 of 4

Conditional formatting with formula(s) across multiple ranges

Hybrid View

  1. #1
    Registered User
    Join Date
    03-20-2021
    Location
    Cloud9
    MS-Off Ver
    2015 Excel 15.0 (2016 Office for Mac)
    Posts
    2

    Post Conditional formatting with formula(s) across multiple ranges

    TL:DR - I want to highlight duplicates names across 50+ small lists in the same sheet.

    Good day, I am struggling with what I thought would be a simple use case for conditional formatting but turns out to be too complex for my 'middle-of-the-road' excel skills! Any help would be so much appreciated.

    - I have a spreadsheet which is used to manage an organisation made up of multiple groups of teams.
    - The team members are all stored on a separate tab which feed the drop down list so that the user can only select a named person from the master list.

    NEED:
    I want the sheet to automatically highlight duplicates, so that it is obvious where a person has been named multiple times in different teams as different people are responsible for their own teams within the sheet.

    REQUIREMENTS:
    For now, I want to highlight yellow if a person is named twice anywhere in the sheet, and highlight red if a person is named 3 or more times anywhere in the sheet.

    Screenshot 2021-03-20 at 13.15.52.png

    CURRENT WORKING FORMULAS
    I have been able to get this working within a single team, using some Google fu… but this is not of any use as the point of this rule is for it to apply across multiple teams (there are around 20 groups of 2-3 teams in the sheet).

    I currently have these for Column D (I have to be honest, I don’t really understand how this even works, but it does):

    Highlight Yellow =COUNTIF($D$15:$D$29,D15)=2
    Highlight Red =COUNTIF($D$15:$D$29,D15)>2

    And then a replicated rule for Column J:
    Highlight Yellow =COUNTIF($J$15:$J$29,J15)=2
    Highlight Red =COUNTIF($J$15:$J$29,J15)>2

    etc.

    Screenshot 2021-03-20 at 13.28.54.png

    PROBLEM
    I am not able to get this working to find duplicates across multiple teams, even for the 3 teams in the screenshot, let alone across the others off screen. I am looking to be able to highlight duplicates across all teams and ideally in the simplest way possible.

    Screenshot 2021-03-20 at 13.20.58.png

    I have attached the workbook for reference. Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2412
    Posts
    1,514

    Re: Conditional formatting with formula(s) across multiple ranges

    Select range D15:AH29
    Formula for Conditional Formatting, new red rule:
    Formula: copy to clipboard
    =AND(D$14="Name";COUNTIF($D$15:$AH$29,D15)>=3)


    Adjust it for yellow rule.

    Make sure the box "Applies to" is the whole range $D$15:$AH$29

    Good luck!

  3. #3
    Registered User
    Join Date
    03-20-2021
    Location
    Cloud9
    MS-Off Ver
    2015 Excel 15.0 (2016 Office for Mac)
    Posts
    2

    Re: Conditional formatting with formula(s) across multiple ranges

    Thanks, Estevaoba. The conditional formatting formula box returned an error, so I assumed that should read
    "Name",
    and it worked fine across the range from row 15 to 29 in my dummy sheet.

    However, when I try to apply the Red rule to the full range in the sheet (so $D$15:$AH$134) it messes things up and highlights some incorrect cells (cells that don't contain names). The Yellow rule seems to work fine.

    Attachment 724768

    I have attached an updated version of the workbook with the updated formatting rules/formulas applied.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2412
    Posts
    1,514

    Re: Conditional formatting with formula(s) across multiple ranges

    The reason it messed things up is that the formula relies on a row with the text "Name".
    So I'm afraid you can't have one rule covering all the teams. You'll have to do this in sections, one rule for each set of teams.
    The rule as specified above for the first set of teams, rows 15 thru 29, the formula below for next set of teams, starting at row 59, and so on.
    Formula: copy to clipboard
    =AND(D$58="Name";COUNTIF($D$59:$AH$73,D59)>=3)

    For this rule, the box "Applies to" will be $D$59:$AH$73

    Happy trails!

+ 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. Conditional Formatting, multiple ranges/tabs
    By Fayecattini in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-07-2021, 11:05 PM
  2. Possible to apply conditional formatting across multiple ranges?
    By plasteredric in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-26-2017, 10:36 PM
  3. Conditional Formatting with Multiple Ranges
    By jkj115 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2015, 07:35 PM
  4. Replies: 15
    Last Post: 09-02-2010, 03:49 PM
  5. multiple date ranges & conditional formatting
    By gechu in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2010, 09:26 AM
  6. Conditional formatting in multiple ranges.
    By SimonH.UK in forum Excel General
    Replies: 6
    Last Post: 11-22-2009, 10:26 AM

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