Share via

Delete Duplicate Values Based on Multiple Criteria using VBA

Anonymous
2014-03-07T20:39:30+00:00

Hello All, 

Raw Data
Group Sec Code Item Name Purchase Pay Date Rate
12345 11396Q102 Item 1 08-Jan-14 03-Feb-14 0.45
12345 123456789 Item 2 13-Jan-14 17-Feb-14 0.23
ABCD 11396Q102 Item 1 08-Jan-14 03-Feb-14 0.45
ABCD 035710411 Item 3 27-Dec-13 31-Jan-14 0.3
ABCD 11396Q102 Item 1 27-Dec-13 31-Jan-14 0.4
6789 11396Q102 Item 1 08-Jan-14 03-Feb-14 0.48
6789 123456789 Item 2 13-Jan-14 17-Feb-14 0.23
6789 00287Y109 Item 4 13-Jan-14 14-Feb-14 0.4
Desired Results
Group Sec Code Item Name Purchase Pay Date Rate
12345 11396Q102 Item 1 08-Jan-14 03-Feb-14 0.45
12345 123456789 Item 2 13-Jan-14 17-Feb-14 0.23
ABCD 035710411 Item 3 27-Dec-13 31-Jan-14 0.3
ABCD 11396Q102 Item 1 27-Dec-13 31-Jan-14 0.4
6789 11396Q102 Item 1 08-Jan-14 03-Feb-14 0.48
6789 00287Y109 Item 4 13-Jan-14 14-Feb-14 0.4
Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Ashish Mathur 101.9K Reputation points Volunteer Moderator
    2014-03-08T00:04:49+00:00

    Hi,

    Try this on a copy of your live dataset first.

    1. Select the raw data set (including first row as header row) and go to Data > Remove Duplicates
    2. Uncheck all boxes there except Sec code and Rate
    3. Click on OK

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-03-07T21:22:06+00:00

    Hi Mike,

    I was hoping for some help in deleting duplicate values based off of multiple criterea. Each item has a unique Sec Code. I do not care about the "Group column." (i.e.6789) My desired results will show the security codes with all of the unique rates. Item 1 has 3 different rates (text color red in the desired results). So ideally, I would like to delete duplicates on items that have the same sec code and rate. Row 3 for example has the same sec code and the same rate as row 1 so I would want to delete the duplicate instance.

    Any help wouuld be greatly appreciated.

    Thanks - Jay

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2014-03-07T20:57:56+00:00

    Hi,

    Can you provide an explanation for why the rows were deleted?

    For example. The 3 rows for group 6789, one was deleted, why that particular row?

    6789 11396Q102 Item 1 08-Jan-14 03-Feb-14 0.48
    6789 123456789 Item 2 13-Jan-14 17-Feb-14 0.23
    6789 00287Y109 Item 4 13-Jan-14 14-Feb-14 0.4

    Was this answer helpful?

    0 comments No comments