Search list for required data copy/paste row

redspanna

Well-known Member
Joined
Jul 27, 2005
Messages
1,602
Office Version
  1. 365
Platform
  1. Windows
Hi all

I would like some code that will search through column D of sheet "LOG" for the name "ANTHONY" - when found copy the entire row where "ANTHONY" is found and paste onto next available row in SHEET2
Loop this until all rows in sheet "LOG" have been searched

Result will be a seperate data log in SHEET2 that ALL have the words ANTHONY

Any help appreciated and thanks in advance
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Why write a code for this? You can autofilter for Anthony and copy/paste the result manually. Is this needed for a large number of names which causes the task to become more laborous?
 
Upvote 0
Hi and thanks for ur reply,

There are only 3 names to search for and I want each one found to be listed (together with corresponding data) on a separate sheet.
I would prefer code for this as it is to be incorporated into a userform

thanks again and hope you can help further
 
Upvote 0
No worries on this one Guys
I have played around (for the first time) with the Autofilter and created some code using the macro record function.......

we live and learn !!
;)
 
Upvote 0

Forum statistics

Threads
1,214,397
Messages
6,119,271
Members
448,882
Latest member
Lorie1693

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top