Need to move entire row from one sheet to another

rspauster

New Member
Joined
Jan 12, 2018
Messages
2
I have a call log file that has 2 worksheet Open and Closed, Under the Column Status(G column) when I put closed I would like the entire row to be moved to the Closed Worksheet. Here are the columns I have. This will be constantly added to so the range will keep growing.

DateName of Person/Company Phone #Reason of CallEmployee's TaskFollow up NeededTask Complete

<colgroup><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hey wassup!

Try this out in the sheet VBA so Right Click on the "Open" sheet and click View Code and insert this into there and it should work fine

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lastClosed As Integer
Dim currentRow As Integer
lastClosed = Sheets("Closed").Cells(Rows.Count, 7).End(xlUp).Row + 1
    If Intersect(Target, Range("G:G")) Is Nothing Or Target.Cells.Count > 1 Then Exit Sub
        Application.EnableEvents = False
        If Intersect(Target, Range("G:G")).Value = "Closed" Then
            currentRow = Intersect(Target, Range("G:G")).Row
            Rows(currentRow).Cut Sheets("Closed").Rows(lastClosed)
        End If
        Application.EnableEvents = True
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

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