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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
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,216,099
Messages
6,128,819
Members
449,469
Latest member
Kingwi11y

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