Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How does one return a specific cell in a web query?
I have a web query that pulls data to Excel, but it pulls an entire table.
How can I specify that I want only, for example, the data residing in the third cell in row 3? Thanks much in advance. My current code follows: Dim qts As QueryTables Dim qt As QueryTable Set qts = ActiveSheet.QueryTables Set qt = qts.Add("URL;http://www.pcquote.com/stocks/quote.php?symbol=TR", Application.Range(ActiveCell.Address)) With qt .AdjustColumnWidth = True .BackgroundQuery = False If .FetchedRowOverflow Then MsgBox "Query too large!" .FieldNames = True .PreserveColumnInfo = False .PreserveFormatting = True .WebDisableRedirections = False .WebFormatting = xlWebFormattingAll .WebPreFormattedTextToColumns = False .WebSelectionType = xlSpecifiedTables .WebSingleBlockTextImport = False .WebTables = "8" .Refresh End With |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How does one return a specific cell in a web query?
Qt.Destination.Offset(2,2)
possibly. -- Regards, Tom Ogilvy "quartz" wrote in message ... I have a web query that pulls data to Excel, but it pulls an entire table. How can I specify that I want only, for example, the data residing in the third cell in row 3? Thanks much in advance. My current code follows: Dim qts As QueryTables Dim qt As QueryTable Set qts = ActiveSheet.QueryTables Set qt = qts.Add("URL;http://www.pcquote.com/stocks/quote.php?symbol=TR", Application.Range(ActiveCell.Address)) With qt .AdjustColumnWidth = True .BackgroundQuery = False If .FetchedRowOverflow Then MsgBox "Query too large!" .FieldNames = True .PreserveColumnInfo = False .PreserveFormatting = True .WebDisableRedirections = False .WebFormatting = xlWebFormattingAll .WebPreFormattedTextToColumns = False .WebSelectionType = xlSpecifiedTables .WebSingleBlockTextImport = False .WebTables = "8" .Refresh End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return the filtered value into a specific cell | Excel Worksheet Functions | |||
Cell to return a specific value if left blank | Excel Worksheet Functions | |||
How do you use sumproduct to return specific cell data? | Excel Worksheet Functions | |||
How to return the row # of an expression in specific array of cell | Excel Worksheet Functions | |||
Select cell containing specific text &return value from another ce | Excel Worksheet Functions |