I've got two Excel sheets where one sheets consists of a list of users. And the other list contains the same data, only the same user is listed several times. Now, I need some way of comparing the second list with the first one and delete the rows that contains a user that's not found in the first list.
The first list looks like this:
- Paul Mccartney
- John Lennon
- George Harrison
- Ringo Starr
The second list might look like this:
- Paul Mccartney
- Paul Mccartney
- Paul Mccartney
- John Lennon
- John Lennon
- John Lennon
- George Harrison
- George Harrison
- George Harrison
- Ringo Starr
- Ringo Starr
- Ringo Starr
- Ringo Star
- Ringo Star
- Ringo Star
So, comparing these two lists, you see that the name Ringo Star is NOT in the first list, and I want to delete those rows. I've tried with several loops, but I can't quite get this to work. I guess I could add these items to an array of some sort, and run it though a function. But is there an easy way of doing this without that much code?
[VBA added]