+ Reply to Thread
Results 1 to 22 of 22

Conditional formatting not highlighting highest distinct values

  1. #1
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    11

    Conditional formatting not highlighting highest distinct values

    Hi,

    I hope someone can help me! I have a list of values in which I need all cells that have the 3 highest values highlighted in a certain colour. Conditional formatting will highlight the top 3 for example, but it doesnt allow for the distinct values to be highlighted, only the top 3 values themselves.

    ie: I have a list as follows:
    60
    30
    50
    30
    30
    50
    40
    40
    30
    30

    So I would all cells that have a 60, a 50 or a 40 highlighted. If you use the conditional formatting help it would only highlight the 60, the 50 and the other 50.

    Can someone give me a hand?

    Thanks

    Steve

  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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,387

    Re: Conditional formatting not highlighting highest distinct values

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    Please update your profile: 'latest' is not specific enough. Which 'latest'? 2019? 365?
    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
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    11

    Re: Conditional formatting not highlighting highest distinct values

    HI and thanks for the welcome.

    The actual sheet has sensitive information on so I cannot attach it - and I am using Excel 2013 as far as I can tell. Sorry to be vague but this is doing my head in!

    Many thanks in advance for any assistance.

    Steve.

  4. #4
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,387

    Re: Conditional formatting not highlighting highest distinct values

    Please update your profile as requested with Excel 2013 (which, of course, is NOT the latest version).

    Your sample workbook should be representative, desensitised data as it says in the big, yellow banner up top to which I drew your attention.

  5. #5
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    11

    Re: Conditional formatting not highlighting highest distinct values

    OK I think I have attached a sample sheet now
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Conditional formatting not highlighting highest distinct values

    How about
    =A1>=LARGE(IF(ISNUMBER($A$1:$A$20),IF(ROW($A$1:$A$20)=MATCH($A$1:$A$20,$A$1:$A$20,0),$A$1:$A$20)),3)

  7. #7
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    11

    Re: Conditional formatting not highlighting highest distinct values

    Oh Wow! That is perfect!

    Thank you so much for your help.

    Steve

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Conditional formatting not highlighting highest distinct values

    You're welcome & thanks for the feedback.

  9. #9
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    11

    Re: Conditional formatting not highlighting highest distinct values

    Sorry to raise this query again - I tried to drop that formula into the actual spreadsheet I am working on and it doesnt seem to work? I cannot work out why. I have attached another test sheet with the amounts in that I need formatted. Basically I enter values into cells P6:P25 and they copy down divided by 10 into cells F31:F50. It is these cells in F31:F50 that I need formatted - can you help again?
    Attached Files Attached Files

  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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,387

    Re: Conditional formatting not highlighting highest distinct values

    Please see the First sentence in post#4 and comply with my request.

  11. #11
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    11

    Re: Conditional formatting not highlighting highest distinct values

    Done!

    Many thanks

  12. #12
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Conditional formatting not highlighting highest distinct values

    How about
    =F31>=LARGE(IF(ISNUMBER($F$31:$F$50),IF(ROW($F$31:$F$50)-ROW($F$31)+1=MATCH($F$31:$F$50,$F$31:$F$50,0),$F$31:$F$50)),3)

  13. #13
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    11

    Re: Conditional formatting not highlighting highest distinct values

    Superb again Fluff! I tried to cut and paste your initial formula and change the cell references but couldnt get it to work - but this seems to work a treat. Thanks once again!

  14. #14
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Conditional formatting not highlighting highest distinct values

    You're welcome & thanks for the feedback.

  15. #15
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    11

    Re: Conditional formatting not highlighting highest distinct values

    I wonder if I can tap into your brain again Fluff? I have used the formulas you have mentioned into my sheet and it works perfectly. However, there is one cell that needs to have a value depending on all 4 certain cells being of a certain value. For example, in sheet TESTING SHEET #2 the cells from J31 down to J50 need to have a value of 'YES' if the 4 cells to the left or it are highlighted. I think this can be done in VB but I tried to drop your formula in and tweak it and - you guessed it - I couldn't do it.

    Ideally the formula should say that, for cell J31 for example, that if F31 is in the top 3 unique values between F31:F50 AND G31 is in the top 3 values between G31:G50 AND H31 is in the lowest 3 values between H31:H50 AND I31 is more than 4 then the cell should say 'YES'. This needs to work for cells from J31 to J50 if you know what I mean.

    Does that make sense? Are you OK to help me out again? This will be the last time. I promise.
    Attached Files Attached Files

  16. #16
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Conditional formatting not highlighting highest distinct values

    You will need to use the same formulae that you us in the CF.

  17. #17
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    11

    Re: Conditional formatting not highlighting highest distinct values

    Hi Fluff. Yes I did try that but it doesn't seem to work. I can get it working for cell J31 bit when you copy the formula down it stops working correctly - even if I update the cell references. I thought it would be quite simple but there is obviously something I am not doing right.

  18. #18
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Conditional formatting not highlighting highest distinct values

    Try
    =IF(AND(F31>=LARGE(IF(ISNUMBER($F$31:$F$50),IF(ROW($F$31:$F$50)-ROW($F$31)+1=MATCH($F$31:$F$50,$F$31:$F$50,0),$F$31:$F$50)),3),G31>=LARGE($G$31:$G$50,3),H31<=SMALL($H$31:$H$50,3)),"Yes","")

  19. #19
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    11

    Re: Conditional formatting not highlighting highest distinct values

    It doesnt quite work right I am afraid. Do not worry though, you have already spent enough time on this Fluff. I really do appreciate the help you have given me so far though.

  20. #20
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Conditional formatting not highlighting highest distinct values

    It works for me
    Attached Files Attached Files

  21. #21
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    11

    Re: Conditional formatting not highlighting highest distinct values

    Wow! Yes that's great. I will use that. Really not sure what I am doing that doesn't make it work but thank you so so much for looking at this for me. I feel like I owe you something??

  22. #22
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Conditional formatting not highlighting highest distinct values

    You're welcome & thanks for the feedback.

+ 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] Conditional Formatting Highlighting Formula for Multiple Values
    By papaaj1 in forum Excel General
    Replies: 6
    Last Post: 04-15-2019, 12:40 PM
  2. [SOLVED] Conditional formatting highlighting the Unique & Minimum Values
    By bambino86 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-04-2017, 07:33 AM
  3. Conditional Formatting - highlighting until values are filled in
    By HStollery in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 10-20-2016, 11:43 PM
  4. Replies: 13
    Last Post: 03-28-2014, 12:45 AM
  5. Highlighting the values using conditional formatting in vba
    By satpalbhullar87 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2013, 11:08 PM
  6. Conditional formatting highlighting multiple values
    By upperguy in forum Excel General
    Replies: 3
    Last Post: 04-22-2013, 12:53 PM
  7. Replies: 3
    Last Post: 06-12-2012, 04:52 PM

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