Cut-paste row to sheet2 if columnvalue is met [Solved/Closed]

Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
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

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
763
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
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
763 > Trowa
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

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!