Hi there!
I just registered so I'm new here, and relatively new to Excel macro's as well. There's a work related excel issue that's been cracking my skull for a while now. I get this assignment in one form or another quite often but I can't figure out a foolproof solution.
The situation:
- I have a LongList of records containing e-mail addresses, names, zipcodes and so on
- I have another ShortList of just e-mail addresses, that I know are also in the long list
- I have to remove the ShortList's e-mail addresses and the associated rows of data from the LongList
I searched around online and keep coming back to this macro. Supposedly, it loops through the LongList and checks if a record occurs on the ShortList. If it does, it deletes the entire row of data from the LongList. Have a look:
This one worked for me once, however I get mixed results ever since. Sometimes it seems to remove records from my LongList but after a double check, the addresses from the ShortList are still on the LongList (so it has removed some other records).Please Login or Register to view this content.
While I sort of understand what each line of code does, I'm a bit confused about which sheet is the LongList and which one the ShortList in the above macro. Also, I'm not sure how to enter the ranges. In my case I need all of a column, not just the first 100, but I'm not sure about the syntax for that.
Can anyone help out an excel newbie and tell me if the above macro is correct, or how I need to change it, or heck, even suggest an alternative? You'd really make my day! Thanks in advance.
Bob
Bookmarks