Link to home
Start Free TrialLog in
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.
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.

Avatar of Nikola Vucica
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.

Hi all,
also thanks gowflow
If you need my input and to be effective and directed to your request I reiterate: Please post a workbook.
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.