+ Reply to Thread
Results 1 to 11 of 11

How To: Extract unique values from 3 columns into 1 column.

  1. #1
    Registered User
    Join Date
    03-09-2016
    Location
    San Marcos, Texas
    MS-Off Ver
    Office 2013
    Posts
    9

    How To: Extract unique values from 3 columns into 1 column.

    Good Morning,

    I have been going around this problem for the last 2 days and I have been unable to come up with a solution. Any and all help will be amazing.


    I am working on a report that will tell us how our managers are ranking the interviewees.
    For example: I want to know how Phillip is doing, (Look at the info from table section):

    Capture3.JPG

    What this report will ultimately tell us is if the managers need training in the interview process. For example if you view the pic above(look at the Example info), you can tell that Phillip is grading the interviewee's extremely low, which is potentially hurting our hiring, he will need to be retrained.

    Here is what I am working with. (all info is dummy test info)

    Capture.JPG

    I need the 3 columns (Interviewer 1, Interviewer 2, Interviewer 3) all merged into a single column. The names on the Interviewer columns are interchangeable and names will be placed randomly with no order what so ever.

    I have tried many different formulas but haven't been able to get it to work.
    This is the closest I have been able to get, but I still can't get the other columns to work.

    =IFERROR(INDEX($F$2:$F$30, MATCH(0,IF(ISBLANK(F2:F23),1,COUNTIF($R$1:R1, $F$2:$F$30)), 0)),"")

    NOTE: The end goal is to get a report on how the managers are grading, and to know if the managers need to be retrained.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: How To: Extract unique values from 3 columns into 1 column.

    You can use a User-Defined-Function, code below, Array-entered into multiple cells using Ctrl-Shift-Enter, used like this

    =GetUniques((F2:F20,H2:H20,J2:J20))

    Note the doubled parens.... select more cells than you expect unique names - the extra cells will be left blank.

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    03-09-2016
    Location
    San Marcos, Texas
    MS-Off Ver
    Office 2013
    Posts
    9

    Re: How To: Extract unique values from 3 columns into 1 column.

    Good Afternoon Bernie,

    First off, Thank you very much for taking your time to help me out, I really appreciate it.

    I don't dabble much with macro's, but I did the following:
    alt+f11
    found the rawdata page and pasted the code you provided.
    Saved macro.
    went to cell T2 and copied entered the =Getuniques function and pressed ctrl+Shift+Enter
    but the result was #Name?

    Please advise as to what I should try next. Might there be a formula that I can try?

    Thanks again.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: How To: Extract unique values from 3 columns into 1 column.

    You need to place the code into a standard codemodule - use the Insert menu from the top of the VBE, and you need to save the file as a macro-enabled .xlsm file.

    Also, when you enter the function, first select cells T2:T100, then type the formula into the formula bar and enter it using Ctrl-Shift-Enter. That will allow the function to return all the values that it finds.

  5. #5
    Registered User
    Join Date
    03-09-2016
    Location
    San Marcos, Texas
    MS-Off Ver
    Office 2013
    Posts
    9

    Re: How To: Extract unique values from 3 columns into 1 column.

    Hi Bernie, I was able to make the code work, thanks but I ran into a problem. When I enter new information for new interviewees the formula doesn't auto update? is there a way for me to make it update automatically? I apologize for not being specific.

    Thanks again

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: How To: Extract unique values from 3 columns into 1 column.

    You can make the formula volatile by wrapping it in IF function with a volatile conditional, like

    =IF(NOW()>0,formula,"")

    Again, entering it with Ctrl-Shift-Enter.

    But if you are changing one or more of the cells in the function, it should recalc - you can force a recalc using Ctrl-Alt-F9

  7. #7
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: How To: Extract unique values from 3 columns into 1 column.

    You can make the formula volatile by wrapping it in an IF function with a volatile conditional, like

    =IF(NOW()>0,formula,"")

    Again, entering it with Ctrl-Shift-Enter.

    But if you are manually changing one or more of the cells in the function, it should recalc - you can force a recalc using Ctrl-Alt-F9 if you are pasting new data over the old.

  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: How To: Extract unique values from 3 columns into 1 column.

    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  9. #9
    Registered User
    Join Date
    03-09-2016
    Location
    San Marcos, Texas
    MS-Off Ver
    Office 2013
    Posts
    9

    Re: How To: Extract unique values from 3 columns into 1 column.

    Interviews Score Sheet BETA.xlsm

    I have provided the workbook, for this issue. I have found that using arrays doesn't auto populate new information. The problem is that I am not going to be the one that updates the workbook. so it needs to be as easy to understand as possible.

    I am halfway with the first formula, but would like help finishing it up.

    Thanks again.

  10. #10
    Registered User
    Join Date
    03-09-2016
    Location
    San Marcos, Texas
    MS-Off Ver
    Office 2013
    Posts
    9

    Re: How To: Extract unique values from 3 columns into 1 column.

    Quote Originally Posted by egarcia7 View Post
    Attachment 452533

    I have provided the workbook, for this issue. I have found that using arrays doesn't auto populate new information. The problem is that I am not going to be the one that updates the workbook. so it needs to be as easy to understand as possible.

    I am halfway with the first formula, but would like help finishing it up.

    Thanks again.
    Any ideas of how to complete the formula?

    This is the formula I have so far:

    =IF(ROWS(P13:P13)>COUNTA(F13:F34),"",INDEX(F13:F34,AGGREGATE(15,6,(ROW(F13:F34)-ROW(F13)+1)/(F13:F34<>""),ROWS(P13:P13))))

    The problem with the formula is as follows:
    1)it lists all values and I need only the unique values.
    2)I wasn't able to incorporate the other 2 columns into this formula.

    Thanks for your help.

  11. #11
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: How To: Extract unique values from 3 columns into 1 column.

    For me, the formulas in the columns labeled Test3 and Test4 return all the unique values when entering values in F,H, or J,f ro the ranges they reference, so I'm not sure what your issue is, other than the ranges you reference in the formulas are limited - when you put test at the bottom of column F, it was outside the ranges used by the two formulas.

    If you want to, change my function definition to the code below, and use the function like

    =GetUniques((F2:F100,H2:H100,J2:J100))

    where 100 is a row far beyond your used range of 2 to 24 (note that you were entering values into row 25, sa any function you use must at least include 2:25)

    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 03-24-2016 at 12:40 PM.

+ 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. Extract unique values from multiple columns
    By potejam in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 12-16-2015, 08:26 PM
  2. [SOLVED] How to extract unique values from multiple columns in Excel?
    By chief_abound in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-16-2015, 02:45 AM
  3. [SOLVED] Extract unique from two columns and sum total from the third column
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-09-2015, 03:37 PM
  4. Extract data from multiple columns, group and sum up unique values
    By Alcotraz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-05-2015, 06:54 PM
  5. Replies: 2
    Last Post: 12-04-2014, 04:59 AM
  6. Replies: 8
    Last Post: 09-12-2013, 09:17 AM
  7. [SOLVED] Extract unique values from 2 columns DYNAMICALLY
    By albatr0n in forum Excel General
    Replies: 17
    Last Post: 08-28-2012, 08:42 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