I have the following macro
Sheets("24hr to 9am").Select
Cells(1, 1).Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & Range("One!A17").Value _
, Destination:=Range("$A$1"))
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Sheets("Since 9am").Select
End Sub
The data I am getting contains 7 columns, however every time I run the macro it does not overwrite the current data. So new data gets pasted in every 8th column.
Bookmarks