Hi,
I am having problems completing a VBA for copy and paste a cell from one workbook to another automatically every minute. For example, A4 in sheet1 changes and cell A2 in sheet2 needs to show same value every minute automatically. Then each time the cell in A4 sheet1 changes, the next row in sheet2 (A2, A3, etc) will be added sequentially. When I have a formula in sheet1 (say =sum(A1:A3) to display the result in A4, it will not paste to A2 sheet2. Hope this make sense and any help is appreciated. Thanks.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$4" Then
Application.Wait (Now + TimeValue("0:01:00"))
a = Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Row + 1
Sheets("Sheet2").Range("A" & a).Value = Sheets("Sheet1").Range("A4").Value
End If
End Sub
Bookmarks