+ Reply to Thread
Results 1 to 12 of 12

Extract Unique values based from multiple columns

  1. #1
    Forum Contributor
    Join Date
    08-22-2016
    Location
    london
    MS-Off Ver
    2013
    Posts
    121

    Extract Unique values based from multiple columns

    Hi

    I have a work book that stores vehicle numbers (which is the unique value), these values are stored in three seperate columns on the same sheet


    i have a formula that extracts unique values from a single column, but i dont know how to extract fro multiple columns

    here is my code

    Please Login or Register  to view this content.

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Extract Unique values based from multiple columns

    Attach a sample workbook showing what you expect as your output.

  3. #3
    Forum Contributor
    Join Date
    08-22-2016
    Location
    london
    MS-Off Ver
    2013
    Posts
    121

    Re: Extract Unique values based from multiple columns

    thanks for the reply


    i have attached a sample sheet


    so on "dashboard" sheet, there is a table Called "reported vehicles", on "Data" sheet, there are three columns in a table called "vehicle_1", "vehicle_2" and "vehicle_3"

    what i need to do is look at all three columns and display the unique values in "dashboard sheet table "reported Vehicles"

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Extract Unique values based from multiple columns

    No attachment.

    Go Advanced -> Manage Attachments -> Upload

  5. #5
    Forum Contributor
    Join Date
    08-22-2016
    Location
    london
    MS-Off Ver
    2013
    Posts
    121

    Re: Extract Unique values based from multiple columns

    apologies, i didnt notice the max upload size
    Attached Files Attached Files

  6. #6
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Extract Unique values based from multiple columns

    Your sample doesn't have any sample data or what the output should look like.

  7. #7
    Forum Contributor
    Join Date
    08-22-2016
    Location
    london
    MS-Off Ver
    2013
    Posts
    121

    Re: Extract Unique values based from multiple columns

    sorry

    there you go
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,197

    Re: Extract Unique values based from multiple columns

    This works for contiguous columns (so I copied Vehicle 1 to column Q) and it is unsorted.

    in E12

    =INDIRECT("Data!" &TEXT(MIN(IF((Data!$O$2:$Q$100<>"")*(COUNTIF($E$11:E11,Data!$O$2:$Q$100)=0),ROW($2:$100)*100+COLUMN($O:$Q),7^8)),"R0C00"),FALSE)&""

    I think you will need to use VBA for non-contiguous columns plus sorting but others may be able to give you a formula solution.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    08-22-2016
    Location
    london
    MS-Off Ver
    2013
    Posts
    121

    Re: Extract Unique values based from multiple columns

    Quote Originally Posted by JohnTopley View Post
    This works for contiguous columns (so I copied Vehicle 1 to column Q) and it is unsorted.

    in E12

    =INDIRECT("Data!" &TEXT(MIN(IF((Data!$O$2:$Q$100<>"")*(COUNTIF($E$11:E11,Data!$O$2:$Q$100)=0),ROW($2:$100)*100+COLUMN($O:$Q),7^8)),"R0C00"),FALSE)&""

    I think you will need to use VBA for non-contiguous columns plus sorting but others may be able to give you a formula solution.
    hi


    thanks for the reply


    the reason its unsorted is, some of the data is imported from a text file, them copied to the table,

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,197

    Re: Extract Unique values based from multiple columns

    I simple said "Unsorted" as the formula does not sort.=: I don't know if a sorted list is required.

  11. #11
    Forum Contributor
    Join Date
    08-22-2016
    Location
    london
    MS-Off Ver
    2013
    Posts
    121

    Re: Extract Unique values based from multiple columns

    got it great stuff, thank you


    one more question, is there any way of displaying just the filtered data in the table?

  12. #12
    Forum Contributor
    Join Date
    08-22-2016
    Location
    london
    MS-Off Ver
    2013
    Posts
    121

    Re: Extract Unique values based from multiple columns

    Quote Originally Posted by JohnTopley View Post
    I simple said "Unsorted" as the formula does not sort.=: I don't know if a sorted list is required.
    hey


    i seem to be getting some odd values from the formula you provided. i cant upload the sample sheet as it wont let me

+ 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. [SOLVED] Formula to Extract Unique Values/Remove Duplicates Across Multiple Columns of Data
    By Lanceh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-24-2017, 09:07 AM
  2. Find Unique Values Based On Multiple Columns
    By aimone111 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-08-2016, 05:22 AM
  3. How to extract values from a cell into multiple columns based on criteria
    By Totemus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-28-2016, 01:35 PM
  4. Extract unique values from multiple columns
    By potejam in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 12-16-2015, 08:26 PM
  5. [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
  6. 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
  7. [SOLVED] Extract Unique Text Values based on Multiple Criteria
    By Kattenhove in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-26-2014, 07:59 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