+ Reply to Thread
Results 1 to 12 of 12

sort and remove duplicates macro causing unique entries to vanish

  1. #1
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415

    sort and remove duplicates macro causing unique entries to vanish

    hi guys
    i have a macro coded by jbeaucaire ( thank you )
    that doesnt return all the unique entries

    there are a couple where its spelt the name but one case a capital letter for surname where another doesnt
    but it only returns one
    i would like for the sheet to return all names if they are different

    the macro list is on sheet "PLAYERS" in column a
    the manual list i have done is in same sheet column c

    if anyone could take a look and correct this it would be much appreciated.
    jb has admitted he is flummoxed as to why
    thanks

    the file is available to look at here . http://www.sendspace.com/file/m7tzxe

    apologies, here is the link to my original post http://www.excelforum.com/excel-prog...and-merge.html
    Last edited by excellentexcel; 01-24-2009 at 04:59 PM.

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hi

    I can't download your file as I am at work. I do not know how you are extracting unique items but if it is using AdvancedFilter (either in code or thru the worksheet operation) then it doesn't distinguish between upper & lower case. The following will however:

    Please Login or Register  to view this content.
    You need to change the range of the red highlighted code to whatever is appropriate. It will return a list of the unique items in the range chosen.

    Richard
    Richard Schollar
    Microsoft MVP - Excel

  3. #3
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415
    hi richard
    thanks for your reply
    unfortunately i couldnt get your code to work
    it may be my error but this is the code i already have from beaucaire
    Please Login or Register  to view this content.

  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
    I'm pretty sure we extended those sort ranges well down past A873, didn't we? Like A10000 wasn't it?
    _________________
    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!)

  5. #5
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415
    yes, we did jb
    20,000 but its still not returning all

  6. #6
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415
    anyone please?

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello excellentexcel,

    Not all of us have Excel 2007. Unless you are using some features specific to Excel 2007, can you also post a copy in Excel 2003 format?

    Sincerely,
    Leith Ross

  8. #8
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415
    ok
    i have uploaded to here http://www.sendspace.com/file/n93c2t
    if you press the macro on sheet "PLAYERS" > TRANSFER NAMES
    and then click the heading a to sort
    you will see all the names
    yet if you go to sheet "DATA SHEET" row 394 you will see a name "ANDERS LARSSON" and it doesnt appear in the macr list for some reason

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello excellentexcel,

    I am having to make a few changes to the code so it will run under Excel 2003. Just wanted to let you know the status.

    Sincerely,
    Leith Ross

  10. #10
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415
    thanks leith

  11. #11
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello excellentexcel,

    Ok, I just rewrote the macro rather than trying to fix the problems. It is shorter and does everything: transfers the names, removes duplicates and sorts the names from A to Z. This should run with Excel 2007. Delete the old macro in Module2 and copy this one in its place.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  12. #12
    Forum Contributor
    Join Date
    01-06-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    415
    quite simply wow leith
    thank you so much
    thats EXACTLY what i wanted

+ 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