+ Reply to Thread
Results 1 to 8 of 8

Apply formatting to first instance of highest value wthin range (exclude duplicates)

  1. #1
    Registered User
    Join Date
    08-03-2010
    Location
    NY
    MS-Off Ver
    Office 2003
    Posts
    10

    Apply formatting to first instance of highest value wthin range (exclude duplicates)

    I am using conditional formatting, applying it to a range of cells, such that the highest value is bolded and the cell color is changed. If I have three values I am comparing, but two are the same value and that is the highest value, then the formatting is applied to both cells that contain the value. How can I apply it to only the first instance of the highest value within the range I am comparing? I do not want to delete the duplicate; I just want it to apply the formatting to only the first instance of the highest value.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Apply formatting to first instance of highest value wthin range (exclude duplicates)

    If this is your data:

    Data Range
    A
    1
    9
    2
    10
    3
    10
    4
    8
    5
    5
    6
    ------


    Select the entire range and apply the conditional formatting.

    Use the "Use a formula..." option and use a formula like this:

    =AND(A1=MAX(A$1:A$5),COUNTIF(A$1:A1,A1)=1)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    08-03-2010
    Location
    NY
    MS-Off Ver
    Office 2003
    Posts
    10

    Re: Apply formatting to first instance of highest value wthin range (exclude duplicates)

    Worked perfectly - thanks!

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Apply formatting to first instance of highest value wthin range (exclude duplicates)

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

  5. #5
    Registered User
    Join Date
    08-03-2010
    Location
    NY
    MS-Off Ver
    Office 2003
    Posts
    10

    Re: Apply formatting to first instance of highest value wthin range (exclude duplicates)

    Quick follow-up question: if I write the formula and apply to cells 1,2 and 3 in column A, is there an easy way to copy it to apply to cells 4,5, and 6, then 7,8, and 9, etc. without having to manually type the new range each time? I want to compare three sets at a time as individual groups, but apply the same formatting to each group. If I have to take the time to do it I will, but if there is an easier way, I'd love to learn it. Thanks!

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Apply formatting to first instance of highest value wthin range (exclude duplicates)

    Unfortunately, you'll have to apply the formula to each separate range.

  7. #7
    Registered User
    Join Date
    08-03-2010
    Location
    NY
    MS-Off Ver
    Office 2003
    Posts
    10

    Re: Apply formatting to first instance of highest value wthin range (exclude duplicates)

    Boo, lol. Ok thanks!

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Apply formatting to first instance of highest value wthin range (exclude duplicates)

    You're welcome!

+ 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: 03-22-2015, 12:30 PM
  2. [SOLVED] Count duplicates and duplicates with suffix as one instance
    By ruraljur0r in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-24-2014, 12:38 AM
  3. Replies: 6
    Last Post: 02-15-2013, 01:40 PM
  4. [SOLVED] How to apply Conditional Formatting to just ONE cell and NOT its duplicates in a range?
    By otorrhea in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-25-2012, 02:31 AM
  5. Replies: 6
    Last Post: 03-29-2012, 12:16 AM
  6. Replies: 3
    Last Post: 08-10-2006, 11:40 PM
  7. [SOLVED] Finding and Formatting the 5 highest values in a range?
    By Lance Hoffmeyer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-18-2005, 07:05 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