+ Reply to Thread
Results 1 to 6 of 6

Eliminate Duplicates based on several criteria

  1. #1
    Registered User
    Join Date
    06-19-2014
    Location
    Montreal
    MS-Off Ver
    Office 365
    Posts
    12

    Eliminate Duplicates based on several criteria

    Hi,

    I have an Excel Sheet with all the purchases from my customers (13 000 rows) including 5 collumns:
    1- Customer name
    2- Date of puschase
    3- Item Code
    4- Item description
    5- Unit Price

    For some reason, some customer paid different prices for the same item. I want to keep the last price paid for each items purchased by each customer. I guess only a macro would work?

    Thanks for helping!

    Simon

    Duplicates.xlsx

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Eliminate Duplicates based on several criteria

    Please Login or Register  to view this content.
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

  3. #3
    Registered User
    Join Date
    06-19-2014
    Location
    Montreal
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Eliminate Duplicates based on several criteria

    Fantastic, Thanks so much!

  4. #4
    Registered User
    Join Date
    06-19-2014
    Location
    Montreal
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Eliminate Duplicates based on several criteria

    I just notice that the macro keep the oldest price when in fact, I need the most recent based on the purshasing Date (collumn B)...


  5. #5
    Registered User
    Join Date
    06-19-2014
    Location
    Montreal
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Eliminate Duplicates based on several criteria

    I tried to modify the command to Descending for collumn B (Date) but it didn't worked...

    Thanks for helping,

    Simon

  6. #6
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Eliminate Duplicates based on several criteria

    In your attachment, I highlighted the ones I expected it to keep and then ran the code. It seems to work fine, so maybe I'm misunderstanding what you want.

    After.JPG

    Sorry, the attachment uploader seems to be on the fritz. The Before pic is blank, and it's not letting me replace it. I guess you can look back at the attachment.
    Attached Images Attached Images
    Last edited by natefarm; 09-30-2014 at 09:55 AM. Reason: "Before" picture was blank

+ 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. [SOLVED] Eliminate blank rows when pulling criteria based data from one spreadsheet to another
    By Terisammis in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-28-2014, 10:39 AM
  2. eliminate duplicates based on different variables
    By Zosius in forum Excel General
    Replies: 1
    Last Post: 12-04-2012, 08:26 AM
  3. Eliminate Duplicates
    By TShelt in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-01-2011, 11:47 AM
  4. eliminate records based on 3 criteria!
    By cyoung315 in forum Excel General
    Replies: 2
    Last Post: 04-26-2007, 10:28 AM
  5. [SOLVED] Re: Concat values in two or more rows based on id and eliminate duplicates
    By Tom Ogilvy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2005, 02:05 PM

Tags for this Thread

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