I have two worksheets with data and I would like to find unmatched records from Sheet1 to Sheet2 and display on unmatched results in Sheet3. Is there a VBA code to do that? I am novice to programming. Thanks for your help.
I have two worksheets with data and I would like to find unmatched records from Sheet1 to Sheet2 and display on unmatched results in Sheet3. Is there a VBA code to do that? I am novice to programming. Thanks for your help.
This example checks column A on each sheet and builds a list on Sheet3. Adjust as necessary.
Please Login or Register to view this content.
Regards
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Kinez101,
Something like this?
Please Login or Register to view this content.
Notes:
When adjusting this macro to your workbook, make sure to update the following:
- ResultSheet: This is the sheet that the results will be displayed on. It is Sheet3 in your example.
- FirstSheet: This is the first sheet that contains data to search through. It is Sheet1 in your example.
- SecondSheet: This is the second sheet that contains data to search through. It is Sheet2 in your example.
- FirstSheetDataCol: The macro assumes that the data in the FirstSheet is in column A
- SecondSheetDataCol: The macro assumes that the data in the SecondSheet is in column A
Hope that helps,
~tigeravatar
Guys,
Thank you very much. Both examples worked.
Hi folks,
I need to do something VERY similar, but I have never touched VBA until now (both code examples work great, though as I copied, pasted and ran them).
Here's my situation:
Sheet1 has the last names of 150 employees
Sheet2 has the last names of 78 of those employees who are "Eligible" for a new program at work.
The result I want on Sheet3 is that same list of 150 employees, with an output of "Eligible" or "Not Eligible" next to their last name.
So I am doing something similar in that I am looking for matches and non-matches between two lists, but the result I want is the original list with their eligibility "status" in the cell immediately to the right (Column B).
Any tips, revisions would be WELCOME! Thanks.
@filetgagnon: welcome to the forum.
You don't need code for that. You can just add a column to the original sheet with a COUNTIF on the name. If it's 0 then s/he's not eligible.
Please note though, that you have broken one of the forum rules:
Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
Thank you, that worked perfectly.
So sorry about the rules violation, I was rushing through, and I've only ever viewed forums, never posted or registered - my bad - won't happen again.
Thanks again!
You're welcome. No problem. Thanks for the rep.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks