• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Modified cell paste to another worksheet

basstreblevol

New Member
Hello,

First time poster looking for some help.

I've done a bit of searching and I'm sure there's a simple answer but I can't seem to find it anywhere. Basically I want to paste a modified cell to another worksheet. I've been able to get the row with the modified cell copied and pasted but that's as far as I've gotten.

Here's what I have so far...

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim KeyCells As Range, nxtRow As Integer
   
    ' The variable KeyCells contains the cells that will
    ' cause an alert when they are changed.
    Set KeyCells = Range("B2:N16")
   
    If Not Application.Intersect(KeyCells, Range(Target.Address)) _
           Is Nothing Then

        ' Display a message when one of the designated cells has been
        ' changed. Paste modified cell on the next available row of Sheet 4

        nxtRow = Sheets(4).Range("A" & Rows.Count).End(xlUp).Row + 1
        Target.EntireRow.Copy _
        Destination:=Sheets(4).Range("A" & nxtRow)
        MsgBox "Cell " & 1 & Target.Address & " has changed."
    End If
End Sub

Thanks!
 
Back
Top