Excel data updation

Closed
Report
-
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
-
Hello,





I have date in an excel spreadsheet that gets updated automatically every minute. I want that data to be sent to a new row every time the data gets updated. How to do this in excel.Want to know the VBA code or function please.

Prakash

1 reply

Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
803
suppose the data is downloaded in row no.1 for A1 to the right every minute
and suppose
the time value for each minute is in A1(If there is change in assumptions modify the event code)

right click sheet tab (where the data is downloaded) click view code.
in the window that comes up copy this event code

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$1" Then Exit Sub
Target.EntireRow.Copy
With Worksheets("sheet2")
.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).PasteSpecial
End With
Application.CutCopyMode = False

End Sub


the archival is done in sheet2 (if the archival sheet name is different modify the above event code)

when the data is downloaded autoamtically this one row data is copied to sheet 2 after the last previous row. (at the first time it will copied in row 2)