Hi i have a question basically i am downloading data from the web into the same excel sheet from two separate (sometimes more) web pages:
1. http://finance.yahoo.com/gainers?e=us
2. http://finance.yahoo.com/losers?e=us
i am using a macro to do this eg:
my question is after the first web page is downloaded what code would i need to find the last empty cell in column A (given that there are empty cells throughout the data in column A ) and how do i paste the next lot of raw web page data to that cell
1. http://finance.yahoo.com/gainers?e=us
2. http://finance.yahoo.com/losers?e=us
i am using a macro to do this eg:
Code:
Sub stocks()
With ActiveSheet.QueryTables.add(Connection:= _
"URL;http://finance.yahoo.com/gainers?e=us", Destination:=Range("$A$1"))
.Name = "gainers?e=us_1"
.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 = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub