I have two worksheets, one is called "donors" and the other "donations". On the "donors" worksheet, I have a list of people who have donated money to our organization, each person with a unique donor ID number.
On the "donations" worksheet, it's just a list of all donations made along with the unique donor ID next to each donation. This list has alot of duplicate ID's, since for example one person can give 10 times in one year.
I am building a macro which will use a nested loop to first look up an ID in the "donors" sheet, then go to the "donations" sheet and loop through all the rows, looking for that ID. If it finds a match, it will copy two cells from that row, and then paste them to the end of the row on the "donors" sheet. It will continue looping through all donations, looking for additional matches, and if it finds any will repeat the same actions. After it finishes this, it moves on to the next "donors" ID.
I have some of the programming down, and I've confirmed that the nested loop functions as is, but I just don't know how to get it to copy and paste the cells from one sheet to the end of the row on the other sheet.
Here is the code I have so far:
Can anyone help me finish this one off? Thanks alot!Please Login or Register to view this content.
Bookmarks