Cut-paste row to sheet2 if columnvalue is met

Solved/Closed
Trowa - Feb 22, 2010 at 08:54 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Feb 25, 2010 at 08:48 AM
Hello,

I have got 2 sheets. Sheet1 contains a list of assignments, in which column B contains the status of those assignments. Sheet2 contains completed assignments.

Now I would like to check sheet1's column B for the word "Completed", when found, cut the entire row and paste it to sheet2.

Both sheet1 and sheet2 contains headers in the first row.

Could someone provide a VB code for this task?

Thanks in advance,
Trowa
Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 22, 2010 at 10:08 AM
Oke, thanks rizvisa1.

Not exactly what I was looking for, but it gave me an idea of how to write my own code.

So thanks for your reply, issue solved.

Best regards,
Trowa
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766 > Trowa
Feb 25, 2010 at 08:48 AM
Trowa
I think all you would have to change is sheet names and this line


Selection.AutoFilter Field:=19, Criteria1:="=" & 1, Operator:=xlAnd

to

Selection.AutoFilter Field:=2, Criteria1:="=Completed", Operator:=xlAnd