+ Reply to Thread
Results 1 to 6 of 6

How do I sort and extract unique entries from multiple references

  1. #1
    Registered User
    Join Date
    11-05-2010
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    31

    How do I sort and extract unique entries from multiple references

    Hi all. Hope you can help. Here's one I struggle with. Multiple reference data extraction.

    I need to be able to import two columns of data that has duplicate entries in it and from that data, create dropdown lists of unique entries from each column.

    The end result of the two dropdown lists is all that is required after the script runs although I suspect the Dropdown Options will need to stay for the lookup. The imported data and extract/sort can be temporary so it matters not if this data is re-organised as part of the script.

    The Dropdown Options can also be predefined names that allow for variable length tables so there is no need for the vba to create defined names.

    As the imported data and the sorted lists are going to be variable in length as well, this is a little above my expertise and I would likely write some extremely inefficient code that is ten times the necessary size to achieve this. I'm keen to learn how this is best achieved with well written code.

    Hope you can help. Ive attached an example workbook to help explain what I'm trying to achieve.

    Neil.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How do I sort and extract unique entries from multiple references

    Like so... data moved to top row to keep formulas simple.

    The formulas in I and K are array formulas, CTRL-SHIFT-ENTER to confirm any changes you make in those formulas. I1 and K1 have a different formula than that in use below there.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    11-05-2010
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: How do I sort and extract unique entries from multiple references

    Hi JBeaucaire,

    thanks for the reply. I see how columns I and K are working but the dropdowns arent working the way I needed. I need the CAR MODELS to only display the cars of the selected CAR MAKE. So, if I select FORD, the only makes listed are ESCORT and MUSTANG.

    Is this possible ?

    Many thanks.

    (p.s. in case it matters, Ive updated my profile as I'm using Excel 2010 now)
    Last edited by sherlock99; 07-12-2014 at 07:04 AM.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: How do I sort and extract unique entries from multiple references

    Pl see attached file.
    Attached Files Attached Files

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: How do I sort and extract unique entries from multiple references

    Another way to achieve this is as follows......

    In order to get the sorted list of unique car makers, try this Array Formula (CSE required).

    In H8
    Please Login or Register  to view this content.
    and copy down.

    In order to get the unique models of each car maker, try this Array Formula again. (CSE)

    In I8
    Please Login or Register  to view this content.
    and drag across and down.

    For dependent drop down list in B10
    Use the following formula for data validation. Data --> Data Validation -- > List --> paste the formula given below in the formula box.

    Please Login or Register  to view this content.
    Set a New Rule for conditional formatting of cell B10 using the below formula.....
    Please Login or Register  to view this content.
    and set format as Fill --> No Color, then click on Number Tab --> Custom --> Type ;;; (three semi colon) --> OK.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  6. #6
    Registered User
    Join Date
    11-05-2010
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: How do I sort and extract unique entries from multiple references

    Thank you for all your contributions. It's a great learning tool to see these challenges approached in different ways.
    I think sktneer, that your solution best meets my specific requirement on this occasion.

    Thank you all.

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: How do I sort and extract unique entries from multiple references

    Glad it helped. Thanks for the feedback.
    If that takes care of your question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.
    Moreover you may also click on * (star) to Add Reputation to those who have put their time and efforts to help you in this forum. This is another way to say thanks to them.

+ 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 entries in the table
    By ronnycool in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-09-2013, 04:21 AM
  2. Extract unique entries in the table
    By ronnycool in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-09-2013, 04:12 AM
  3. Using IF to sort unique entries
    By moonsong40 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-23-2012, 04:13 PM
  4. Using VBA: I have a list with multiple entries.Need to reduce down to unique entries
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-25-2011, 03:19 PM
  5. Extract Unique entries in a column
    By Jeff in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-18-2005, 04:05 PM

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