Cutting rows from multiple worksheets and pasting in another based on cell value

Copper Contributor

Greeting,

<span;>I have a workbook containing all of my coworker's actions but they stopped using it because everything is done manually, there is a worksheet named after every one of them and another for completed actions, and all of their worksheets have the same number of columns except the completed one with column A being the person responsible for the action.


<span;>I'm trying to find a VBA code to cut a row from the active worksheet if the word "done" is in the column R and paste it into the <span;>next free row<span;> in the "Complete PU Actions" worksheet but in column B because in column A it copies the worksheet's name. My company has version 2019.


<span;>I have searched for a code but the best I got was one that passes into a row above 90 and when I deleted the rows below it would paste it in the same row over and over.

<span;>I only have the experience of the past two days but I saw a lot of codes naming the last free row as something in a private sub, wouldn't it write over itself if I used the same private sub in each worksheet? Could I use one code in the model of the workbook and it would work in all of the worksheets?

1 Reply

Hi @Bamhir2315 ,

 

I think that it may be a little long code, but let's do this together. I'm sharing with you an example in the attached file. This is not the complete solution, but solves part of the problem (maps all of the worksheets, copy the rows that contains "Done" in column R and paste into PU Complete first empty row.

 

Please, take a look on there and tell me your impressions. Also, make any adjustments to make the sample more close to your real context. If this sample is in the right path, I will keep working on that, based on your feedback.