Results 1 to 11 of 11

look up the max value in column 2 for a unique values in column 1

Threaded View

  1. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: look up the max value in column 2 for a unique values in column 1

    See my attached sheet for two different methods of accomplishing this.

    Method 1 used Advanced Filter to list just the unique names from the list in column A, then used MAX and MIN array functions (applied with Ctrl+Shift+Enter) to return the highest and lowest values associated with each unique name in the list. Only problem with Advanced Filter is it is not dynamic by default. If the original list changes, the unique list won't change until you run the Advanced Filter>Unique Values again. This can be overcome in VBA, but adds more to the task.

    Method 2 used 2 array (Ctrl+Shift+Enter) formulas:
    In cell H2:
    Formula: copy to clipboard
    =INDEX($A$1:$A$1000,MATCH(0,COUNTIF($A$1:$A$1000,"<"&$A$1:$A$1000),0))

    In cell H3 and filled down:
    Formula: copy to clipboard
    =IF(COUNTIF($A$1:$A$1000,">"&H2),INDEX($A$1:$A$1000,MATCH(COUNTIF($A$1:$A$1000,"<="&H2),COUNTIF($A$1:$A$1000,"<"&$A$1:$A$1000),0)),"")
    Then used the same MAX and MIN array formulas as in Method 1.

    Hope it helps! Let me know if you have any questions.

    - Moo
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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