+ Reply to Thread
Results 1 to 10 of 10

Conditional formatting 5 biggest values

  1. #1
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Belgium
    MS-Off Ver
    O365
    Posts
    102

    Conditional formatting 5 biggest values

    Hi,

    i would like to highlight the 5 biggest values in a range.
    But not using the "top 5" standard formatting option from excel.

    I would like to see MAXIMAL 5 values which are highlighted.
    Example:

    Data range: 5 5 5 5 3 3 2 4 3 4 3

    Desired result: 5 5 5 5 3 3 2 4 3 4 3
    or other example:
    5 5 5 5 5 5 5 5 5 5 4

    So the '4' is only highlighted 1 time in the first example, the 5 only 5 times in the second example.

    Excel attached
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Conditional formatting 5 biggest values

    Try this CF rule for H5:

    =AND(H$5>=LARGE($H$5:$S$5,5),COUNTIF($H$5:H$5,">="&LARGE($H$5:S$5,5))<=5)

    Applies to:

    =$H$5:$S$5
    Attached Files Attached Files
    Last edited by AliGW; 07-28-2021 at 07:44 AM.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Belgium
    MS-Off Ver
    O365
    Posts
    102

    Re: Conditional formatting 5 biggest values

    Hi Ali,

    Thanks for the reply.
    This doesn't fit the job 100%.

    It highlights more then 5 values.
    According to your formula, 2 times '4' is highlighted.

    So like this:
    5 5 5 5 3 3 2 4 3 4 3

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Conditional formatting 5 biggest values

    No, it does EXACTLY what you said you wanted:

    Excel 365 (Windows) 32 bit
    G
    H
    I
    J
    K
    L
    M
    N
    O
    P
    Q
    R
    S
    5
    RESULT
    5
    5
    5
    5
    3
    2
    3
    2
    4
    2
    4
    2
    Sheet: Sheet1

    Did you look at the attachment?
    Last edited by AliGW; 07-28-2021 at 08:17 AM.

  5. #5
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Belgium
    MS-Off Ver
    O365
    Posts
    102

    Re: Conditional formatting 5 biggest values

    Thanks, this works at first sight.

    But if I enter this... It doesn't highlight the correct values.
    See attachment.
    Attached Files Attached Files
    Last edited by jonas-martens; 07-28-2021 at 08:36 AM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Conditional formatting 5 biggest values

    Yes, but it was edited before you posted yours!!!

    Last edited by AliGW; Today at 12:44 PM.

    Today, 12:49 PM #3
    jonas-martens
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Conditional formatting 5 biggest values

    But if I enter this... It doesn't highlight the correct values.
    See if you can tweak it to suit. I don't have time at the moment - sorry.

  8. #8
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2402 and WPS V2022
    Posts
    3,327

    Re: Conditional formatting 5 biggest values

    Pls Click the left mouse button to select the ranges area H5:S5 , Conditional formatting\manage rule\Edit rule
    put my new formula and replace the old one

    HTML Code: 

    Pls Click the left mouse button to select the ranges area H3:S3 , Conditional formatting\manage rule\Edit rule
    put my new formula and replace the old one

    This screen appears when the formula is uploaded, Access Denied-Sucuri Website Firewall, so put the formula directly into the attachment file
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by wk9128; 07-28-2021 at 08:01 PM.

  9. #9
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Belgium
    MS-Off Ver
    O365
    Posts
    102

    Re: Conditional formatting 5 biggest values

    Works Perfect!

    Thanks

  10. #10
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2402 and WPS V2022
    Posts
    3,327

    Re: Conditional formatting 5 biggest values

    You're Welcome. Thank You 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. Conditional Formatting Template - Formatting without values
    By tkelbel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-09-2019, 12:20 PM
  2. Replies: 7
    Last Post: 06-07-2017, 08:22 AM
  3. Formatting Cells with Date or Text Values in a Conditional Formatting Formula
    By Phil Hageman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2014, 09:36 AM
  4. [SOLVED] Formula to give me the 10 biggest values in a list (including duplicates)
    By ExcelFailure in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-05-2013, 10:55 AM
  5. [SOLVED] Formula to show the large/biggest of the last 50 values of a column
    By dualaudio454252 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-26-2013, 11:16 PM
  6. Conditional Formatting to show biggest reductions in %
    By LDouble3 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2013, 11:45 AM
  7. Biggest values
    By Cadmium in forum Excel General
    Replies: 2
    Last Post: 06-18-2009, 03:17 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