+ Reply to Thread
Results 1 to 4 of 4

Pull Unique Values from a List and Automatically Sort in Alphabetical Order

  1. #1
    Registered User
    Join Date
    08-02-2011
    Location
    Madison, USA
    MS-Off Ver
    Excel 2010
    Posts
    51

    Question Pull Unique Values from a List and Automatically Sort in Alphabetical Order

    Hi Folks.

    Here's an example column for the question I have:

    SAP Project Manager
    Smith, Randall
    Collins, Todd
    Padgett, Leslie
    Schwankl, Thomas
    Schwankl, Thomas
    Olson, Jeffrey
    Padgett, Leslie
    Richards, Chad
    Korth, Kurt
    Plesnyayev, Vitaliy
    Smith, Christopher
    Olson, Jeffrey
    Schwankl, Thomas
    Smith, Christopher
    Smith, Christopher
    Richards, Chad
    Collins, Todd
    Collins, Todd
    Collins, Todd
    Collins, Todd
    Olson, Jeffrey
    Collins, Todd
    Padgett, Leslie
    Steele, Terri
    Grimsley, Stephen
    Collins, Todd
    Padgett, Leslie
    Padgett, Leslie

    My question is, is there a way to make a table that always, upon saving, pulls the unique values from that list and sorts them from A to Z. Fresh data would be pasted into this source column every week, but the column would remain identical in its location, so the formula that accomplishes what I need won't break. Any help is appreciated. The simpler the solution the better. Cheerio and thanks for your time.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,678

    Re: Pull Unique Values from a List and Automatically Sort in Alphabetical Order

    Would it be ok if the solution was to delete all duplicates and then sort alpha? If that will work for you, then insert this in a module.

    Please Login or Register  to view this content.
    Alan
    Last edited by alansidman; 08-28-2013 at 12:15 PM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,678

    Re: Pull Unique Values from a List and Automatically Sort in Alphabetical Order

    If you are not inclined to a VBA solution, this video just made it to my inbox. Thought you might be interested in it.

    http://www.youtube.com/watch?v=7Rjh-...em-subs_digest

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

    Re: Pull Unique Values from a List and Automatically Sort in Alphabetical Order

    Admittedly I have not watched the video, Alan.


    Assuming the data is in A1 going downward, these two formulas will do the job:

    1) In B1, enter this array formula to get the first alphabetized value:

    =INDEX(A$1:A$100,MATCH(0,COUNTIF(A$1:A$100,"<"&A$1:A$100),0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.


    2) To get the rest of the values, enter this array in B2, then copy B2 down a ways:

    =IF(COUNTIF(A$1:A$100,">"&B1), INDEX(A$1:A$100, MATCH(COUNTIF(A$1:A$100,"<="&B1), COUNTIF(A$1:A$100,"<"&A$1:A$100),0)),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array.
    _________________
    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!)

+ 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: 10
    Last Post: 06-13-2013, 04:12 PM
  2. Sort by Alphabetical order macro
    By ad9051 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2011, 10:09 AM
  3. Replies: 7
    Last Post: 01-05-2011, 06:55 PM
  4. sort last names by in alphabetical order
    By Jackie in forum Excel General
    Replies: 1
    Last Post: 05-24-2006, 03:50 PM
  5. Replies: 1
    Last Post: 03-09-2006, 01:24 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