Results 1 to 14 of 14

Macro For Deleting Duplicates, Comparing Rows and Retaining Minimum Value

Threaded View

  1. #1
    Registered User
    Join Date
    04-04-2014
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    Macro For Deleting Duplicates, Comparing Rows and Retaining Minimum Value

    Hi,

    I will appreciate your help. As shown below, I have data from Columns A to D. I want to do the
    following:

    1. Look for duplicates in all column A
    2. For each duplicate found in column A, check if all values in column B are also duplicate.
    3. If the condition in (2) is satisfied, compare column D for all the rows; select the row with the minimum value in column D, and delete the other rows.

    For example:
    A B C D

    Row1: Abby 04/01/2014 7:00PM 0.98437
    Row2: Sam 04/01/2014 9:00PM 0.35627
    Row3: Abby 04/04/2014 7:00PM 0.68932
    Row4: Abby 04/01/2014 7:00PM 0.63132
    Row5: Abby 04/01/2014 7:00PM 0.67532
    Row6: Abby 04/04/2014 7:00PM 0.24932


    Since Rows 1,4 and 5 have the same values in columns A and B; and Row4 value in column E is the smallest value between the 3 rows; Delete Row 1 and 5.

    Same goes with Rows 3 and 6; Delete row 3


    Results
    A B C D

    Row2: Sam 04/01/2014 9:00PM 0.35627
    Row4: Abby 04/01/2014 7:00PM 0.63132
    Row6: Abby 04/04/2014 7:00PM 0.24932


    Thank you for your help!
    Last edited by banawaja; 04-06-2014 at 04:50 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Deleting Duplicates across rows
    By caunyd in forum Excel General
    Replies: 3
    Last Post: 08-06-2013, 03:08 PM
  2. Replies: 3
    Last Post: 11-09-2011, 12:36 PM
  3. comparing the column headers, then deleting the entire column iif duplicates occur
    By vindieselgal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2011, 04:53 AM
  4. Comparing Lists and Deleting Duplicates
    By Fcroft in forum Excel General
    Replies: 1
    Last Post: 02-17-2010, 02:01 PM
  5. [SOLVED] deleting/retaining duplicates
    By jkrake in forum Excel General
    Replies: 0
    Last Post: 12-06-2005, 01:25 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