Avatar of Nikola Vucica
Nikola Vucica
 asked on

Excel 2013 Find and copy duplicates to a new worksheet

Hello all,

Could an expert provide me with VBA to do similar like:


I have a spreadsheet that has an information in Sheet1 and Sheet2. The result must go into Sheet3.

Sheet1 have info in column A (number of rows will change). In this column every cell value is unique.
Sheet2 have info in columns A to F (number of rows will change). Column A may have duplicate values.

If the value of cell A1 of Sheet1 exists in column A of Sheet2, the program will copy that entire row of Sheet2
and paste it in the first free row in the Sheet3. The program must copy every row where he found the same value.

Many thanks in advance.
Microsoft OfficeMicrosoft ExcelVBA

Avatar of undefined
Last Comment
Shums Faruk

8/22/2022 - Mon
Shums Faruk

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Could you please post a sample workbook of your data. I see the link you posted refer to a question I participated in providing the solution. when it comes to unique/duplicates issue could be tricky.

Nikola Vucica

Hi all,
Shums code works fine. Thanks very much.

Please, can I ask one more question:

Is it possible that we can separate or colour Column A of Sheet1 values if they appeared in column A of Sheet2?

My goal is to mark or separate which values are found and which are not.

Nikola Vucica

Hi all,
also thanks gowflow
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy

If you need my input and to be effective and directed to your request I reiterate: Please post a workbook.
Shums Faruk

Hi Nikola,

That you can do with conditional formatting.

If my code works for your initial question. Then I would request you to close this question and raise another one.