if the data destination in the webpage from where you are gonna import data is not changing and if you know what would be new URL which is gonna be, then you can use a code like given below.
Sub Macro1()
y = Sheets("Sheet1").Range("a1").Value
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & y _
, Destination:=Range("$A$1"))
.Name = " " 'here should be the field which needs to be imported.
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = True
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Also, you can just record your macro and can change the fields as necessary.
Bookmarks