+ Reply to Thread
Results 1 to 11 of 11

Highlight a cell in a range depending on the maximum value in another range

  1. #1
    Registered User
    Join Date
    08-07-2019
    Location
    England
    MS-Off Ver
    Microsoft Office 365 Excel
    Posts
    7

    Question Highlight a cell in a range depending on the maximum value in another range

    Heya,

    So I am having an issue which I can't seem to solve.

    I am fairly new to excel formulas so please forgive me if this is a dumb question.

    So here it is:

    I am trying to build a conditional formatting formula which would highlight a cell in range B20 to AF20, based of the highest number in row range B30 to AF30. The cell I want to be highlighted in Row B20 to AF20 is the one which is in the same column as the highest figure in row range B30 to AF30.

    I also would like the exact same but with the smallest figure.

    I have currently got this: =B30:AF30<=SMALL(B30:AF30,1)
    but it isnt working how I want it to

    Any ideas?

    Thanks in advance
    Last edited by Glenn Kennedy; 08-07-2019 at 10:47 AM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Formula Help???

    Select B20:AF20

    Conditional Formatting
    New Rule
    Use a formula to determine...

    =(B30:AF30=MAX($B30:$AF30))

    Format as required
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,416

    Re: Highlight a cell in a range depending on the maximum value in another range

    Hi Please re-read rule 1, which you agreed to stick to a few minutes ago. Your thread title is pretty useless. I've amended it for you, on this occasion as you're new here. It now looks like what we expect of thread titles.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Registered User
    Join Date
    08-07-2019
    Location
    England
    MS-Off Ver
    Microsoft Office 365 Excel
    Posts
    7

    Re: Highlight a cell in a range depending on the maximum value in another range

    Quote Originally Posted by Glenn Kennedy View Post
    Hi Please re-read rule 1, which you agreed to stick to a few minutes ago. Your thread title is pretty useless. I've amended it for you, on this occasion as you're new here. It now looks like what we expect of thread titles.
    Sorry mate, I didnt know what to call it becasue it was complicated. Will do my best again in the future. Thanks for pointing out the error of my ways.

    Quote Originally Posted by Special-K View Post
    Select B20:AF20

    Conditional Formatting
    New Rule
    Use a formula to determine...

    =(B30:AF30=MAX($B30:$AF30))

    Format as required
    Thanks for your fast response, so i gave this a try both with MIN and MAX with different colours, however nothing happens at all. Any other ideas maybe?

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,416

    Re: Highlight a cell in a range depending on the maximum value in another range

    Quote Originally Posted by 7ank0v1c View Post
    Sorry mate, I didnt know what to call it becasue it was complicated. Will do my best again in the future. Thanks for pointing out the error of my ways.
    To be honest, it took me a few moments to think of something better. Sometimes the words just don't come along in the right order!!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,416

    Re: Highlight a cell in a range depending on the maximum value in another range

    Maybe this: (adjust for your wider ranges)

    =COLUMN()=MATCH(MAX($B$30:$K$30),30:30,0)
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-07-2019
    Location
    England
    MS-Off Ver
    Microsoft Office 365 Excel
    Posts
    7

    Re: Highlight a cell in a range depending on the maximum value in another range

    Quote Originally Posted by Glenn Kennedy View Post
    Maybe this: (adjust for your wider ranges)

    =COLUMN()=MATCH(MAX($B$30:$K$30),30:30,0)
    So I tried it and downloaded the file to see and it seems to be what I'm looking for (I adjusted it to the range I'm looking for), but it won't work again? not sure why. This is the formula I ended up using:

    =COLUMN()=MATCH(MAX($B$30:$AF$30),30:30,0)

    is this right?

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,416

    Re: Highlight a cell in a range depending on the maximum value in another range

    Open the CF formula box and make sure:

    a) that it does not have " " around the formula and/or

    b) that it has not corrupted the ranges

    CF messes up sometimes.

  9. #9
    Registered User
    Join Date
    08-07-2019
    Location
    England
    MS-Off Ver
    Microsoft Office 365 Excel
    Posts
    7

    Re: Highlight a cell in a range depending on the maximum value in another range

    Ah okay, so I figured out its because I have corruptions in my range. However, I intentionally leave somethings things blank on my document and it causes these corruptions. How can I ignore these corruptions in this range and the formula still work?
    Last edited by Glenn Kennedy; 08-07-2019 at 01:14 PM. Reason: Removing clutter.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,416

    Re: Highlight a cell in a range depending on the maximum value in another range

    It's not blank cells in a file that causes these problems. It's the way you copy/paste into the CF formula box. I'm sure there's a pattern to the corruptions, but it sure evades me!!! It's a constant source of annoyance to me.

    Anyhow. It works for you now... doesn't it??

    If so, you're welcome. if not. Post a sample sheet and shout.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  11. #11
    Registered User
    Join Date
    08-07-2019
    Location
    England
    MS-Off Ver
    Microsoft Office 365 Excel
    Posts
    7

    Re: Highlight a cell in a range depending on the maximum value in another range

    Quote Originally Posted by Glenn Kennedy View Post
    It's not blank cells in a file that causes these problems. It's the way you copy/paste into the CF formula box. I'm sure there's a pattern to the corruptions, but it sure evades me!!! It's a constant source of annoyance to me.

    Anyhow. It works for you now... doesn't it??

    If so, you're welcome. if not. Post a sample sheet and shout.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.
    Heya, sorry just one more thing within this, how can I do the exact same formula but also with ignoring cells with 0?

    thanks a bunch so far, its been a massive help

+ 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. Replies: 3
    Last Post: 01-10-2019, 09:34 AM
  2. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  3. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  4. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  5. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  6. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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