+ Reply to Thread
Results 1 to 5 of 5

Preventing duplicate entries and sorting by alphabetical using Index feature

  1. #1
    Registered User
    Join Date
    01-10-2010
    Location
    Glasgow
    MS-Off Ver
    Excel 2003
    Posts
    9

    Preventing duplicate entries and sorting by alphabetical using Index feature

    Hey guys,

    This is I hope a very simple request and although I've looked online for a solution, I haven't yet found one which fits both criteria at the same time and I'm absolutely hopeless at formulas so hoping someone can have a quick look and help me out.

    I've got a very basic spreadsheet with a list of names. On a second sheet I've used the =INDEX function to replicate it but only choosing 4 random names out of the 20 available. What I need to do is:

    (a) Prevent duplicate entries from appearing.

    (b) Sort the generated list in alphabetical order.

    Simple but only if you know how I guess. And I haven't got a clue how to do it.

    Thanks in advance for anyone who can help.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Preventing duplicate entries and sorting by alphabetical using Index feature

    Posdamerplatz,

    I've got you started here, with a formula already provided by daddylonglegs in this forum: http://www.excelforum.com/excel-prog...-function.html

    I have applied his formula to your spreadsheet, and it's returning a list of names without duplicates - hopefully someone can help you on the "sorting in alphabetical order" requirement.

    Thanks to daddylonglegs for the formula.
    Attached Files Attached Files
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Preventing duplicate entries and sorting by alphabetical using Index feature

    See if the attached works..
    Attached Files Attached Files
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Preventing duplicate entries and sorting by alphabetical using Index feature

    Hi.
    I added the excel file, it sort random 4 names and prevents duplicatas
    I used help[er columns
    To get the rundom numbers: =LARGE((COUNTIF($D$1:D1,ROW($1:$20))=0)*ROW($1:$20),RANDBETWEEN(1,SUM(--(COUNTIF($D$1:D1,ROW($1:$20))=0)))) CSE

    Resul sheet =INDEX(Names!B:B,MATCH(LARGE((Names!$D$2:$D$21)*(Names!$C$2:$C$21=1),Results!B3),Names!D:D,0)) cse
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-10-2010
    Location
    Glasgow
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Preventing duplicate entries and sorting by alphabetical using Index feature

    Cheers everyone for all the help. It works a treat.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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