+ Reply to Thread
Results 1 to 3 of 3

Highlight the largest value and lowest value of the range obtained from countif values

  1. #1
    Registered User
    Join Date
    03-08-2021
    Location
    Kuala Lumpur
    MS-Off Ver
    Windows 7
    Posts
    3

    Highlight the largest value and lowest value of the range obtained from countif values

    Requirement: To highlight the largest value and lowest value of the range.

    The values in the range are obtained from countif() formula.

    What I did: I am using conditional formatting rules: Top 1 and Bottom 1 to highlight the largest value and lowest value of the range.

    Result: It is perfectly working for the largest value, but since there are zero values (obtained from countif), all cells having zero values are highlighted as lowest value.

    I want to ignore the zero value and highlight the lowest value.

    Any idea on how to do this?

    Thank you.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Highlight the largest value and lowest value of the range obtained from countif values

    Use AGGREGATE instead of countif.
    For example:
    A1 is criteria
    B1:B10 is range of value need to be counted

    Smallest:
    =AGGREGATE(15,6,($B$1:$B$10)/($B$1:$B$10=$A$1)/($B$1:$B$10<>0),1)

    Largest:
    =AGGREGATE(14,6,($B$1:$B$10)/($B$1:$B$10=$A$1)/($B$1:$B$10<>0),1)

    use this to apply to conditinal formatting of cell, i.e, B1

    B1=AGGREGATE(15,6,($B$1:$B$10)/($B$1:$B$10=$A$1)/($B$1:$B$10<>0),1)
    pick format

    and

    B1=AGGREGATE(14,6,($B$1:$B$10)/($B$1:$B$10=$A$1)/($B$1:$B$10<>0),1)
    pick format
    Quang PT

  3. #3
    Registered User
    Join Date
    03-08-2021
    Location
    Kuala Lumpur
    MS-Off Ver
    Windows 7
    Posts
    3

    Thumbs up Re: Highlight the largest value and lowest value of the range obtained from countif values

    Thank you.

    I used the formula =cell=Min(if(range>0,range)) and it is working well

+ 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. Highlight the 2nd lowest value of a non-consecutive range
    By Shareez Saleem in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 07-27-2016, 06:47 AM
  2. Replies: 4
    Last Post: 04-04-2015, 04:24 AM
  3. How to: Highlight lowest and highest values multiple times in same row?
    By Luz1978 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-29-2014, 01:02 AM
  4. Replies: 3
    Last Post: 07-28-2014, 06:08 PM
  5. Replies: 0
    Last Post: 10-12-2012, 01:08 PM
  6. Replies: 2
    Last Post: 03-07-2012, 03:16 PM
  7. Excel 2007 : Highlight the lowest whole number in a range
    By Martin Chamberlin in forum Excel General
    Replies: 4
    Last Post: 04-21-2011, 02:14 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