Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web Query/Cell Reference
I've got a spreadsheet that contains a number of different web querie
for MLB stats from espn.com. I'm trying to create a macro that wil refresh the data for these queries. Here's a visual of what it look like: TEAM NAME stats from web query stats from web query stats from web query TEAM NAME stats from web query stats from web query stats from web query The data from the web queries do not always stay the same size. What want the macro to do is this: find "TEAM NAME", select the cell that is two cells below "TEAM NAME" and refresh the data from the web query. I'm having trouble figuring out the "select the cell that is two cell below 'TEAM NAME' " part. Any help would be appreciated -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web Query/Cell Reference
hawkeyes2002
How many web queries do you have on your sheet? Two? Do you want to find a specific team name and only update the stats for that team? Do you want to update all the web queries on the sheet? Do the locations of TEAM NAME change because the web queries are expanding and contracting? Here's a couple of ideas. If you answer the above questions, I can give you more specific help. To update a query Sheet1.QueryTables(1).Refresh To update all queries ThisWorkbook.RefreshAll If TEAM NAME moves, I would create range names (Insert-Name-Define) for the team name cells. Then you can find their queries like Range("Team1").Offset(2,0).QueryTable.Refresh where Team1 is the a named range. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "hawkeyes2002 " wrote in message ... I've got a spreadsheet that contains a number of different web queries for MLB stats from espn.com. I'm trying to create a macro that will refresh the data for these queries. Here's a visual of what it looks like: TEAM NAME stats from web query stats from web query stats from web query TEAM NAME stats from web query stats from web query stats from web query The data from the web queries do not always stay the same size. What I want the macro to do is this: find "TEAM NAME", select the cell that is two cells below "TEAM NAME", and refresh the data from the web query. I'm having trouble figuring out the "select the cell that is two cells below 'TEAM NAME' " part. Any help would be appreciated. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reference web query data in seperate worksheet | Excel Worksheet Functions | |||
how do i reference a cell with url for web query import? | Excel Worksheet Functions | |||
How do I reference a Web Query on another sheet? | New Users to Excel | |||
Query about Last Cell reference. | Excel Discussion (Misc queries) | |||
Microsoft Query - how to reference a cell value in a filter | Excel Programming |