Hi I currently have an excel workbook that extracts data from an online excel file. I am new to VBA and the macro I built accesses the master file online and simply copies and pastes everything into my workbook on my first sheet. From there my other sheets access my copy of the master to build the graphs and reports. However my method completely overwrites the data every time I run it and it is extremely time consuming to run thousands of calculations when each update only adds about 3 rows.
Is there any way to write a macro that checks if new rows are available and only copy the rows not already in my file?
This is my current code
Dim wbMe As Workbook
Dim wsNew As Worksheet
Dim w As Integer
Dim wbURL As Workbook
Dim url As String
Set wbMe = ThisWorkbook
url = "http://url where data is stored"
Set wbURL = Workbooks.Open(url)
Sheets("Data").Select
ActiveSheet.Range("$A$1:$AQ$27984").AutoFilter Field:=5, Criteria1:="IP2"
Rows("9:30000").Select
Selection.Copy
Application.DisplayAlerts = False
wbURL.Close False
Sheets("Lab Data").Select
Range("A2").Select
ActiveSheet.Paste
Is there any way to write a macro that checks if new rows are available and only copy the rows not already in my file?
This is my current code
Dim wbMe As Workbook
Dim wsNew As Worksheet
Dim w As Integer
Dim wbURL As Workbook
Dim url As String
Set wbMe = ThisWorkbook
url = "http://url where data is stored"
Set wbURL = Workbooks.Open(url)
Sheets("Data").Select
ActiveSheet.Range("$A$1:$AQ$27984").AutoFilter Field:=5, Criteria1:="IP2"
Rows("9:30000").Select
Selection.Copy
Application.DisplayAlerts = False
wbURL.Close False
Sheets("Lab Data").Select
Range("A2").Select
ActiveSheet.Paste