+ Reply to Thread
Results 1 to 26 of 26

Remove Duplicates

  1. #1
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Remove Duplicates

    I'm having a problem deleting duplicates from list in excel. I’ve attached a sample. I’ve tried the following:

    1- Advanced Filter, Unique Records Only
    2- Remove Duplicates function in Excel 07.
    3- Pivot Table
    4- Colour Conditional Formatting, sorting by colour
    5- B2=IF(A2=A3,”Dup”,”Not-Dup”). The entire column returns “Not-Dup”
    6- I’ve tried to resolve using the fix shg & teylyn suggested to Hillto in this thread, but am unable to get the ‘Numeric’ Keypad to appear in the ‘Find’ Function. (http://www.excelforum.com/excel-prog...uplicates.html)

    Can anyone please let me know if I have the same problem as Hillto had? If not, any idea what the problem is?

    thanks in advance!
    Attached Files Attached Files
    Last edited by meggles; 01-18-2010 at 05:32 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    Hi meggles
    The Numeric key pad is the numbers keys grouped togeather not the ones running across the top of the letters
    in find place the curser in the find text box the Alt and 0010
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Re: Remove Duplicates

    Bump. No replies. Thank you.

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    where are the duplicates in the list?

  5. #5
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    Oh... I forgot about the white spaces
    use
    Please Login or Register  to view this content.
    Last edited by pike; 01-15-2010 at 04:42 AM.

  6. #6
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Re: Remove Duplicates

    morning - an example of duplicates are in row 131 (Find- ASSY-717655)

    the text you've written below, is that a macro? how do I execute (i'm only vaguely comfortable with macros)

    cheers

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    Hi meggles
    in that case
    copy the code from forum
    open the excel workbook to desired worksheet

    press the "Alt" button plus the "F11" button for the "visual basic editor"
    go to "insert" ( Top toool bar) > then "Module"

    click in the white space and paste
    click any where in the code and then click "run"
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by pike; 01-15-2010 at 05:05 AM.

  8. #8
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Re: Remove Duplicates

    Thanks Pike! I'm not sure how this worked but it did! Cheers!

  9. #9
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    your weclome
    its nothing specila just regurgitated jindon code

  10. #10
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Re: Remove Duplicates

    morning. thank you to pike for deleting the dups. however, i'm now trying to include the 'de-duped' values in a 'sumif' function and excel is not recognizing the column values properly.

    For example. in the tab 'raw data' 'ASSY-719222' appears 2 times, with a total of 4 units.
    However, in the tab 'deduped data' 'ASSY-719222' correctly appears once, but the 'sumif' formula in column B only shows 1.

    Any suggestions would be most helpful. thanks.
    Attached Files Attached Files

  11. #11
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    check the formula it is offset one -one row
    should be
    b2=SUMIF(Sheet2!A:A,A2,Sheet2!B:B)

  12. #12
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Re: Remove Duplicates

    good catch - however, i fixed formula - still counting incorrectly. (see attached) cheers
    Attached Files Attached Files

  13. #13
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    the white spaces again
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Re: Remove Duplicates

    thanks (again) pike. can you define 'white spaces' and why they're causing an issue? cheers

  15. #15
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    didnt shg say

    you need to look at the import code to nip them in the bud

  16. #16
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Re: Remove Duplicates

    i still think i'm doing something wrong - most likely caused by my lack of familarity with macros.

    when i do the following steps:
    copy raw data into tab 'raw data'.
    go to tab 'deduped data', and copy in macro pike last suggested, and click 'run'.
    i then get the attached error message:
    'Run time error 1004' Application-defined or object-defined error'
    Attached Images Attached Images

  17. #17
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    arr... you will have to select the correct worksheet for the macro

    or add
    Please Login or Register  to view this content.

  18. #18
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Re: Remove Duplicates

    firstly, thank you for your patience, as i am obviously dense.

    i've deleted the 'deduped' sheet - and just have 'raw data' sheet.

    I copied the latest 'complete macro' and ran, but nothing happened. duplicates still remain. could you please tell me what i'm doing wrong (again)? thanks.

    1- Step one - remove duplicates
    2- Countif

    cheers
    Attached Files Attached Files

  19. #19
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    no problems it takes a while to get the hang of it
    this one is for extraction the duplicates and removes the spaces
    Please Login or Register  to view this content.
    this one is to clean the duplicated raw data
    it was for your calculation as they woudnt sum while the spaces
    Please Login or Register  to view this content.

  20. #20
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Re: Remove Duplicates

    cool. i seperated the (2) macros, and successfully ran the first dedupe one.

    the second one (for sumif) runs, but it doesn't remove the dups. i've attached new file. now, what am i doing wrong?
    Attached Files Attached Files

  21. #21
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    Can you zip it and Ill have a look tomorrow
    try when the in the raw data sheet run the macro the macros only work in the open work book and you may have deduped both lists

  22. #22
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Re: Remove Duplicates

    attached in zip format - as requested. cheers.
    Attached Files Attached Files

  23. #23
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    Meggles
    You have moved the columns
    and now are using one worksheet
    You need to change the code when you change the columns


    Please Login or Register  to view this content.
    Where do you copy the data from ????? as the white spaces go on and on and on and on and on

    I would look at how you import the data to rid them you start

  24. #24
    Registered User
    Join Date
    01-22-2008
    Posts
    50

    Re: Remove Duplicates

    morning/afternoon pike. the data is imported via a vlookup table. the data was collated by regional subs around the world. how do I check if this data has white spaces? info is in column C on a tab, on another xlsx.

  25. #25
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    afternoon meggles
    yer .. dont worry about then .. its just that the loop is very slow

    Have you tried the adjustment??

  26. #26
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Remove Duplicates

    meggles
    this will do the trick

    Please Login or Register  to view this content.

+ 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