+ Reply to Thread
Results 1 to 8 of 8

Formula extracting unique column values

  1. #1
    Registered User
    Join Date
    09-01-2011
    Location
    Austria
    MS-Off Ver
    Excel 2007
    Posts
    78

    Formula extracting unique column values

    I know there is an easier way to extract unique items in a column but I'm trying to get better with formulas.
    test.png
    For some reason the formula I'm using here doesn't work. It's the same as the one found here http://cdn.get-digital-help.com/wp-c...-in-excel3.xls although with a slightly different list.

    I'm curious, what's going wrong?

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

    Re: Formula extracting unique column values

    Please upload example workbook. Nobody wants to retype your data from a picture.

  3. #3
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Formula extracting unique column values

    Check cell's format...

    If Text.. change to general..
    and dont forget to confirm the formula by pressing Ctrl + Shift + Enter.. not just Enter..

    You may found a {} curly brackets in the formula after CSE confirmation..
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Formula extracting unique column values

    Hi labogola,

    Did you hold down the Ctrl and the Shift keys before you pressed the Enter key? These are Array formulas and need to be entered using this three key combination. See: http://www.cpearson.com/excel/ArrayFormulas.aspx for a good introduction.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    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: Formula extracting unique column values

    Try in this way.

    IN G1 put this.

    =IF(F1="","",F1)

    In G2 and copy down use this.

    =INDEX(F$1:F$10,MATCH(1,INDEX((COUNTIF(G$1:G1,F$1:F$10&"")=0)*(F$1:F$10<>""),0),0))

    Comments?

    your formula is an ARRAY formula.
    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.

  6. #6
    Registered User
    Join Date
    09-01-2011
    Location
    Austria
    MS-Off Ver
    Excel 2007
    Posts
    78

    Re: Formula extracting unique column values

    Fotis1991 your way works but I'm still curious why my way isn't.

    I've attached a spreadsheet with an example this time...example.xlsx

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Formula extracting unique column values

    hi there again labogola. you usually cant do a formula to look at the cell the formula is in (ROWS is one you can use). for eg. you are now using COUNTIF in the cell itself. in B1, you are using
    COUNTIF($B$1:B1,$A$1:$A$9)
    that turns into a circular reference. so insert a row in row 1 & then in B2:
    =INDEX($A$2:$A$10,MATCH(0,COUNTIF($B$1:B1,$A$2:$A$10),0))

    you seem to be very interested in learning formulas. perhaps this post i did may interest you. do look out for an update tomorrow though. i missed out something in 1 of the sheet
    http://www.excelforum.com/tips-and-t...e-learned.html

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  8. #8
    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: Formula extracting unique column values

    ..Fotis1991 your way works but I'm still curious why my way isn't.

    I've attached a spreadsheet with an example this time...example.xlsx
    Hi there

    First i'd like to say that-as a rule-if you have a solution using regular formula is better to avoid the ARRAY formulas.

    Secondly, as benishiryo mentioned, sometimes our formulas create circular reference.

    It's better to avoid to use these but in some cases(like if we want to get a Time-Date Stamp, using formulas) we can not avoid these and we have to use these. So in this case we do this.

    Choose Tools/Options/Calculation (Preferences/Calculation for Macs) and check the Iteration checkbox.

    So in my example sheet both ways(yours & mine) gives the same-correct answer.

    In the worksheet example i have also a pic of what i see using our ways.
    Attached Files Attached Files

+ 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: 0
    Last Post: 02-20-2012, 02:06 PM
  2. Replies: 11
    Last Post: 02-17-2012, 11:26 AM
  3. Populate a column by extracting unique values from another column?
    By Duke Carey in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 07:05 AM
  4. Populate a column by extracting unique values from another column?
    By Mike Palmer in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  5. Populate a column by extracting unique values from another column?
    By Mike Palmer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-10-2005, 11:05 AM

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