We help IT Professionals succeed at work.

Excel 2013 Find and copy duplicates to a new worksheet

127 Views
Last Modified: 2017-04-14
Hello all,

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

https://www.experts-exchange.com/questions/28390015/Excel-2010-Copy-Duplicates-to-a-new-worksheet.html

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.
Comment
Watch Question

Managing Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
gowflowPartner
CERTIFIED EXPERT

Commented:
Hello
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.

Rgds
gowflow

Author

Commented:
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.

Thanks

Author

Commented:
Hi all,
also thanks gowflow
Regards
gowflowPartner
CERTIFIED EXPERT

Commented:
If you need my input and to be effective and directed to your request I reiterate: Please post a workbook.
gowflow
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
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.

Thanks
Shums

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions