+ Reply to Thread
Results 1 to 16 of 16

Remove duplicates lines by Column A and keep only where Column E has lowest value

  1. #1
    Registered User
    Join Date
    04-20-2012
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2003
    Posts
    14

    Remove duplicates lines by Column A and keep only where Column E has lowest value

    Hello,

    I have an excel file and i want to remove all duplicates line by Colum A(EAN in my excel) and keep lowest value of Column E( Resell price PLN nett).

    Is someting like this:
    5901347068935 RS14-BKD900 SS14 MEDICINE 24.4 99.9
    5901347068935 RS14-BKD900 SS14 MEDICINE 25.4 99.9
    5901347068935 RS14-BKD900 SS14 MEDICINE 27.1 99.9

    I want to keep only

    5901347068935 RS14-BKD900 SS14 MEDICINE 24.4 99.9


    I attached the file. Thank you so much in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    I deleted the data after row 5.500 (otherwise I could not upload the file).

    with helpcolumn to combine the criteria.

    After that I sorted the data (A - Z).

    Filter on the empty cells in column I and delete those one.

    Please reply.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    04-20-2012
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    Hello,

    I don't think is a good ideea. I need something like this: http://www.excelforum.com/excel-gene...est-value.html

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    1) I think you get a solution, so that is always a good idea.


    2) you want something like this: http://www.excelforum.com/excel-gene...est-value.html

    In that case it is usefull to the forummembers to add that in your (first) question


    3) the link offered several solution (pivot table / VBA).

    Since you don't add what you are looking for, that is still confusing to forummembers.

  5. #5
    Registered User
    Join Date
    04-20-2012
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    1. I didn't got a solution for my file.

    2. i tried to use that solution but is not working in my case.

    3. I think that i was very sepecific.

  6. #6
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    Hi

    Use below code, make sure you sort column A data before running this macro..

    Please Login or Register  to view this content.
    Cheers!!

  7. #7
    Registered User
    Join Date
    04-20-2012
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    i tried your code but is not working

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    Advice: Frown ecomotions won't help you forummembers taken the time to help you.

    Having said that, you don't add why the code is not working.

    You got an failure (and if yes, on what line)?

    You don't know how to run the code?

    The code produce a not expected result?

    The code don't works on all rows?

    etc. etc.

  9. #9
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    Quote Originally Posted by nikythebest View Post
    i tried your code but is not working
    Check attachment, click blue button to run macro..
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-20-2012
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    Runtime error 404. Debug c.Offset(1, 0).Resize(Cells(Rows.Count, 1).End(xlUp).Row, 1).SpecialCells(xlCellTypeVisible).Select

    Can you please create the file for me? I just need that file to be done. Please remove duplicates by column A and keep only line where column E has lowest value.

  11. #11
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    Quote Originally Posted by nikythebest View Post
    Runtime error 404. Debug c.Offset(1, 0).Resize(Cells(Rows.Count, 1).End(xlUp).Row, 1).SpecialCells(xlCellTypeVisible).Select

    Can you please create the file for me? I just need that file to be done. Please remove duplicates by column A and keep only line where column E has lowest value.
    check my previous post..its working fine..

  12. #12
    Registered User
    Join Date
    04-20-2012
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    I tried your version but gives this error Run-time error 424: Object required. Can you please run it for me, save and attach the result.

  13. #13
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    Check attachment,

    I have modified code, you can test it & also i have pasted result in second sheet..

    Cheers!!
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    04-20-2012
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    Thank you excelliot. You are the best. God bless you and your family.

  15. #15
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

    It'd also be appreciated if you were to click the add Reputation button at the foot of any of the posts of those who helped you reach a solution.

  16. #16
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: Remove duplicates lines by Column A and keep only where Column E has lowest value

    Quote Originally Posted by nikythebest View Post
    Thank you excelliot. You are the best. God bless you and your family.
    hi,

    Try below code & with this code you can achieve your result in just few seconds

    Please Login or Register  to view this content.
    Cheers!!

+ 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. Remove 'duplicates' to leaving lowest value
    By alseeon in forum Excel General
    Replies: 9
    Last Post: 06-29-2015, 06:22 AM
  2. Replies: 5
    Last Post: 05-08-2014, 07:24 AM
  3. Replies: 5
    Last Post: 03-24-2014, 07:26 AM
  4. Remove duplicates on column A and merge rows in column B
    By JJcool in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-29-2012, 05:41 PM
  5. Remove duplicates from workbook column by column
    By nzflapper in forum Excel General
    Replies: 0
    Last Post: 08-21-2011, 07:53 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