+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Retrieving unique values from a list by INDEX,MATCH, COUNTIF

  1. #1
    Registered User
    Join Date
    10-28-2010
    Location
    UK, Swansea
    MS-Off Ver
    Excel 2010
    Posts
    64

    Retrieving unique values from a list by INDEX,MATCH, COUNTIF

    Column B3:B100 contains a list of postcode sectors, which appear more than once. I want to create a list in column C in which each unique postcode in column B appears only once. Previously I have sorted copied and pasted or used a pivot table but am trying to sort column C out with a formula. I have tried to use a INDEX, MATCH, COUNTIF formula (see sample) but it is not working! Am using in cell C4 ( leaving the first cell in the unique list empty) =INDEX($B$3:$B$100,MATCH(0,COUNTIF($C$3:C3,$B$3:$B$100),0)) but am returning #N/A. which should appear when the list of unique values has completed in Column C.
    Could someone please help or offer an alternative formula.
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Retrieving unique values from a list by INDEX,MATCH, COUNTIF

    Hi Mikey.

    This is an Array formula and needs to confirm with C0ntrol+Shift+Enter. Not just Enter.

    Also put an IFERROR in front of the formula to do not gives you #NA...

    IFERROR(INDEX($B$3:$B$100,MATCH(0,COUNTIF($C$3:C3,$B$3:$B$100),0)),"")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Retrieving unique values from a list by INDEX,MATCH, COUNTIF

    Here is also another solution (non-array):
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-28-2010
    Location
    UK, Swansea
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Retrieving unique values from a list by INDEX,MATCH, COUNTIF

    Hi Fortis, my first attempt, thanks for your response and solution.
    Mikey

  5. #5
    Registered User
    Join Date
    10-28-2010
    Location
    UK, Swansea
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Retrieving unique values from a list by INDEX,MATCH, COUNTIF

    Thanks for quick response and showing both solutions,
    Rgds
    Mikey

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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