EDIT: Ahh. The Title is a little misleading; While thinking through what I needed a more useful result is explained below; sorry about that!
Hey Folks!
I'm SUPER new to the world of Excel Macros and VBA - so bear with me. I'm not new to the world of coding; so thus far I've been managing by hodge-podging code together to accomplish what I need it to - but I've hit a dead end.
I'm going to try and explain this to the best of my ability - let me know if I'm unclear what I'm trying to accomplish. I've got a large Excel table that's full of names and e-mail addresses - it's a report of e-mails that merges some data from two systems we use; a registration form and a database. We want to clean up the data so it only lists folks who 'registered' (it's not always BOTH people listed - sometimes it's only one!) - and the best way to do that is to take the information from a specific column in each row, see if it exists elsewhere in the row and clear the information that doesn't match.
For example:
-A----------------B------------------C--------------------D--------------E------------------F-------------------G-
John ---------- Smith -------- js@email.com -------- Jane -------- Smith --------- js@email.com ------ John
Richard ------ McGee ---------j@email.com-----------Jim----------Samename ----jsn@email.com-------Rich
Mary-----------Ladyface ------ms@email.com--------Steve -------Smith ----------ss@email.com-------Steve
Ideally, for each row I'd like to search A and D for the string from column G. If it finds it, the cell and the two cells to the right are fine - but everything else is 'cleared' (not deleted).
So the above table would look like:
-A----------------B------------------C--------------------D--------------E------------------F-------------------G-
John ---------- Smith -------- js@email.com --------------------------------------------------------------- John
Richard ------ McGee ---------j@email.com-----------------------------------------------------------------Rich
-------------------------- -------------------------------Steve -------Smith ----------ss@email.com-------Steve
Any advice? The only tutorials or existing code I can find for searching for strings involves me copying to a new workbook - and things get confusing with the code there. I don't need to copy things - just clear them; all in the same workbook.
Thanks for your time!![]()
Bookmarks