Filter by value in string and paste rows into new sheet

johnkrenkel

New Member
Joined
Apr 2, 2019
Messages
11
I am trying to sort through a file that comes in a bunch of strings. I am hoping to do the following.

Take a value in the Client sheet (Client name) in A2 and filter the results in the Data sheet (trying to find the client name in the string)

Each record takes up 4 lines so I want to copy those adjacent 4 lines and paste them into the right tab. Delete the original data sheet data and go to the next record and continue until the report has been put into the correct tabs. The tabs will be auto created (I have this done)

The logic should be

Is client A (ClientSheet:A2) in Data Sheet
Yes = Create new tab
Copy the row the record is in plus 3 additional rows
Go to Client Tab
Paste in 1st blank row
Go back to Data Sheet, any other Client a records until no
Go back to ClientSheet and look at Client B

Go through this process until there is no more records in the Data sheet and they are all placed.

Not sure if you can do this via an array and copy multiple 4 row blocks at ones.

Any help will be appreciated.

Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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