+ Reply to Thread
Results 1 to 7 of 7

Conditional formatting on highest values in row

Hybrid View

  1. #1
    Registered User
    Join Date
    09-19-2024
    Location
    London, England
    MS-Off Ver
    MS365 Enterprise, Version 2407
    Posts
    3

    Conditional formatting on highest values in row

    Cross-posted at https://www.mrexcel.com/board/thread...cells.1264619/

    Hello excellent Excel-people,

    I need your support in getting a conditional formatting correct.
    The excel is for a sporting event, showcasing the results of each race. Due to special rules, not all races are counted towards your total score. For every three races that happen, 1 score (the worst one) gets removed. While the calculation of the total points is not a problem, I'm struggling to apply the conditional formatting so that it is directly obvious which results have been removed.


    The sheet is setup the following way:

    Columns A-F, general meta data about participants.
    Columns G - BD, race results (up to 50 races)
    Column BF, total score (after adjustment)
    Cell E4 contains the number of scores that need to be removed

    The data is from row 6 to row 200.

    Problem:
    Let's say there were 13 races, so the highest 4 scores need to be removed.
    In the sheet I want to show all 13 results and use conditional formatting to strikethrough the 4 scores that need to be removed.
    However, all formulas I've tried so far only work if the highest scores aren't duplicates. For example, if the race the participant has 5 times a score of 40 it will strike through all 5 even though it should only format 4 of them.

    I need a formula that recognizes how many cells it needs to adjust and only applies the conditional formatting to those accordingly.

    Thanks a lot in advance for your help!

    Best

    dcobe

    PS: I've added an example workbook with 7 races complete, which should lead to 2 highest scores formatted to strikethrough
    Attached Files Attached Files
    Last edited by 6StringJazzer; 09-22-2024 at 03:56 PM. Reason: added xpost link

  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,565

    Re: Conditional formatting on highest values in row

    Administrative Note:

    Welcome to the forum.

    Is your forum profile showing ONLY the oldest Excel PRODUCT that you need this to work for? 'Latest' could be so many different things ...

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    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
    09-19-2024
    Location
    London, England
    MS-Off Ver
    MS365 Enterprise, Version 2407
    Posts
    3

    Re: Conditional formatting on highest values in row

    Hi Ali,

    thanks a lot for heads-up. I did not know there are so many different versions with different functionalities out there...

    I'm using:
    Microsoft 365 apps for enterprise
    Version 2407

    Ideally, the solution would work across multiple products, as members from different teams might need to use the excel and they might have a different product.

    Thanks a lot

  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,565

    Re: Conditional formatting on highest values in row

    Then I'll remind you what I actually asked:

    Is your forum profile showing ONLY the oldest Excel PRODUCT that you need this to work for?
    Based on what you have just said, this is not the case. Please adjust your profile accordingly with the oldest version before anyone starts suggesting solutions that might not work on all platforms.

  5. #5
    Registered User
    Join Date
    09-19-2024
    Location
    London, England
    MS-Off Ver
    MS365 Enterprise, Version 2407
    Posts
    3
    Hi Ali,
    thanks a lot for your support. I have checked now with everyone who might be working on it and averting is using MS365 in version 2407. so a solution for MS365 would be great. Thanks a lot!!
    Last edited by AliGW; 09-20-2024 at 05:10 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead. Please review the forum guidelines.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,908

    Re: Conditional formatting on highest values in row

    This works for highlighting the two largest numbers.
    1. Add two helper columns populated using:
    =IF(COUNTIFS($G6:$M6,MAX($G6:$M6))>1,AGGREGATE(15,6,(COLUMN($G6:$M6)-COLUMN($F6))/($G6:$M6=LARGE($G6:$M6,COLUMNS($BG6:BG6))),COLUMNS($BG6:BG6)),AGGREGATE(15,6,(COLUMN($G6:$M6)-COLUMN($F6))/($G6:$M6=LARGE($G6:$M6,COLUMNS($BG6:BG6))),1))
    2. Apply the following conditional formatting rule to columns G:M
    =OR(COLUMNS($G6:G6)=$BG6,COLUMNS($G6:G6)=$BH6)
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,843

    Re: Conditional formatting on highest values in row

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so. Cross-posts are allowed but you must provide a link to your posts on other sites.
    For new members: you will not be able to post a full URL, so remove the https://www. section and add one or two breaks to the rest of the address. A Moderator or Admin will then fix the link for you.

    Please see Forum Rule #7 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    I have added the link your post above since you new. Please take the time to review our rules. There aren't many, and they are all important.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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 not highlighting highest distinct values
    By StevieClem in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 11-25-2020, 10:48 AM
  2. Conditional Formatting (Highest value closest to that of a cell)
    By Sontal in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-23-2018, 08:55 AM
  3. Replies: 3
    Last Post: 06-09-2016, 12:51 PM
  4. conditional formatting - finding highest value
    By gocolonel77 in forum Excel General
    Replies: 2
    Last Post: 01-28-2015, 04:52 PM
  5. Conditional formatting - highest value of two columns
    By shreksbro in forum Excel General
    Replies: 1
    Last Post: 08-29-2012, 10:26 PM
  6. [SOLVED] conditional formatting - Highest
    By QPapillon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-28-2006, 04:10 PM
  7. Conditional formatting highest 25% of a column
    By tlosgyl3 in forum Excel General
    Replies: 2
    Last Post: 01-18-2006, 06:40 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