Cut entire rows to another sheet

juannava

New Member
Joined
Jun 20, 2008
Messages
4
I would like help in this:confused:, I have a list of projects in several rows and at the column "K" is the status of the project, according to the status of the projects if the status is completed I want cut this entire rows and paste to another sheet calls Projects_Completed by using a macro

Thanks in advance =)
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hello and welcome to MrExcel.

Do you want a macro to run this as a 'batch' or to transfer the row as soon as "completed" is entered in column K?
 
Upvote 0
Thanks for the welcome

Well for me this will be work better as soon "Completed" is entered at the column "K" or, by clicking a button the macro scan all the data and searching for completed projects this means column K as "Completed" and if it match cut this rows and the others who meet this criteria, and paste to the other sheet
 
Upvote 0
Try this: right click the tab of the sheet where you will enter Completed, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim LR As Long
If Target.Count > 1 Then Exit Sub
If Target.Column = 11 And LCase(Target.Value) = "completed" Then
    Application.EnableEvents = False
    With Sheets("Projects_Completed")
        LR = .Range("A" & Rows.Count).End(xlUp).Row
        Target.EntireRow.Copy Destination:=.Range("A" & LR + 1)
        Target.EntireRow.Delete
        Application.CutCopyMode = False
        Application.EnableEvents = True
    End With
End If
End Sub

Now, if you enter Completed in column K the whole row should be transferred to Projects_Completed.
 
Upvote 0
Hi,

I would like to try this code. I followed the instructions but can't get it to work. Any ideas?

Larry
 
Upvote 0
Hi,

Macros will run. I can't believe how much information (and experts) there is on this site. I'm try out many bits of code to learn how to improve my excel knowledge.

I just can't get this one to run.

Thanks,

Larry
 
Upvote 0
Did you place the code in the worksheet code module? Right click the sheet tab, select View Code and paste the code in there.
 
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,649
Members
448,975
Latest member
sweeberry

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