+ Reply to Thread
Results 1 to 3 of 3

Conditional Formatting Based On List Values Existence

  1. #1
    Registered User
    Join Date
    07-18-2017
    Location
    Rosharon, Texas
    MS-Off Ver
    2016
    Posts
    10

    Conditional Formatting Based On List Values Existence

    Hello,

    I would like to conditioanlly foprmat a cell to be green yellow or red based on how many unique values exist in a range of cells.

    For example.... I have a list of the 11 different sectors in the stock market....

    Materials
    Industrials
    Financials
    Energy
    Consumer Discretionary
    Information Technology
    Communication Services
    Real Estate
    Health Care
    Consumer Staples
    Utilities

    any combination of this list could exist in cell range E5:E14 which is data validated to only contain values from that list.

    In cell I4, I would like it to be conditionally formatted to be:
    green if 5 or more unique values exist in range E5:E14
    yellow if only 4 unique values exist
    red if 3 or less.

    Essentially, this will be a "diversification health check" if there are 5 different unique values in that range than healthy (green)

    Having a hard time figuring out where to start on this. Any help would be greatly appreciated!!
    Last edited by DESSTRO; 08-18-2020 at 04:18 PM.

  2. #2
    Forum Contributor
    Join Date
    05-20-2008
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    174

    Re: Conditional Formatting Based On List Values Existence

    If there is always going to be a list of 11 then how about

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then use conditional formatting based on the result?


    Just seen that you have Excel 2016 so wont have UNIQUE; try...

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Ctrl+Shift+Enter to set as an array. Conditional format to your hearts delight
    Last edited by Andrew-Mark; 08-18-2020 at 05:07 PM.

  3. #3
    Registered User
    Join Date
    07-18-2017
    Location
    Rosharon, Texas
    MS-Off Ver
    2016
    Posts
    10

    Re: Conditional Formatting Based On List Values Existence

    Sorry,

    I couldnt get to the thread in time to mention that I needed to do an Ifs rather than an If because I need 2 different parameters to be specific values.
    Heres what I did to mark the thread SOLVED....

    I did a COUNTIFS for each sector (which worked out better for my purposes anyway because I do want to see that)
    Example:
    Please Login or Register  to view this content.
    Then I did an If for each COUNTIFS to identify if true false:
    Example:
    Please Login or Register  to view this content.
    Then I did in a single cell, a SUM of all the 11 different IF
    Example:
    Please Login or Register  to view this content.
    That Sum gave me the unique value count I was originally asking for so now, as you mention, I can conditionally format to my hearts content!

    FYI, I tried the:
    Please Login or Register  to view this content.
    but it did not produce valid results.... got the ole' #DIV/0!.... and yes, I set as an array.

    Thanks for the help though!!!

+ 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] Summing values based on existence of common values in two strings/arrays
    By Stever7 in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 11-02-2018, 09:00 AM
  2. Populate field based on existence of values in an iterative column/row
    By jwk1230 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-30-2017, 01:15 PM
  3. Replies: 3
    Last Post: 11-16-2016, 04:04 PM
  4. Conditional Formatting with a List of Values
    By beasley101 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-25-2015, 01:00 PM
  5. [SOLVED] Conditional Formatting of List based on selections from Dropdown list
    By FoxyPinkChick in forum Excel General
    Replies: 4
    Last Post: 05-31-2013, 03:32 AM
  6. Conditional Formatting based on Values in a List
    By KNicho41 in forum Excel General
    Replies: 2
    Last Post: 01-02-2013, 07:12 PM
  7. Conditional Formatting Based Upon A List of Values
    By jcavigli in forum Excel General
    Replies: 0
    Last Post: 12-18-2009, 03:19 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