bobkap
Active Member
- Joined
- Nov 22, 2009
- Messages
- 313
- Office Version
- 365
- Platform
- Windows
- Mobile
- Web
I have a rather large set of data. (Short example below) I need to create a macro to do the following:
1. Look for duplicates that show the year 2 years apart. In other words, In the case below, we need only to find duplicate first and last names from 2018 and 2020, regardless of the day and month.
2. Once we find a duplicate we need to delete BOTH the 2018 and 2020 record.
3. End result is that we just want to keep 2018 records that DO NOT show up with a 2020 date.
4. While we're at it, remove all 2019 records.
5. With my limited knowledge of Power Query, I thought that this would be a perfect tool for this. But, the goal is to hand this off to users with very limited knowledge of how to use Excel so I thought a macro would be the best route to take as they would only have to enter a few key strokes to get their desired end result.
Any help would be greatly appreciated.
1. Look for duplicates that show the year 2 years apart. In other words, In the case below, we need only to find duplicate first and last names from 2018 and 2020, regardless of the day and month.
2. Once we find a duplicate we need to delete BOTH the 2018 and 2020 record.
3. End result is that we just want to keep 2018 records that DO NOT show up with a 2020 date.
4. While we're at it, remove all 2019 records.
5. With my limited knowledge of Power Query, I thought that this would be a perfect tool for this. But, the goal is to hand this off to users with very limited knowledge of how to use Excel so I thought a macro would be the best route to take as they would only have to enter a few key strokes to get their desired end result.
Any help would be greatly appreciated.