Looping, Copy Cell, Paste Cell, Printing

ShadowRecon10

New Member
Joined
Aug 5, 2017
Messages
3
Hello All,

I've been trying to figure out how to write a VBA macro to loop through the cells of a column, matching cell(s) with a criteria, copy a cell from that row to a different sheet, and then print a specified selection.

This table is located on Sheet "Data". I need to loop through Column C "Manager". When looping through C, I am looking for instances of "Thomas,Kelly". When an instance of "Thomas,Kelly" is found, I want to copy the User cell and paste it into Cell B6 on Sheet "Report". My Report sheet will update other data based on the User pasted into it, then once I do my selection print on the Report Sheet, I want the loop to continue back on the "Data" sheet until the next instance of "Thomas,Kelly" and do the same thing, copy the User cell to Report B6, do my update and print, and continue on until the search gets to the last row.

[TABLE="class: grid, width: 100"]
<tbody>[TR]
[TD]User[/TD]
[TD]Name[/TD]
[TD]Manager[/TD]
[/TR]
[TR]
[TD]john1[/TD]
[TD]Herbert,John[/TD]
[TD]Thomas,Kelly[/TD]
[/TR]
[TR]
[TD]joejoe20[/TD]
[TD]Johnson,Josph[/TD]
[TD]Blanton,Joe[/TD]
[/TR]
[TR]
[TD]willy5[/TD]
[TD]Rose,Wilson[/TD]
[TD]Thomas,Kelly[/TD]
[/TR]
[TR]
[TD]ronny12[/TD]
[TD]Wilson,Ronny[/TD]
[TD]Melody,Sarah[/TD]
[/TR]
</tbody>[/TABLE]

Any and all help would be appreciated. I've been racking my brain on it for hours, but can't figure out how to do it.

Thank you in advance for the help.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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