How update range after web query?
I've got a spreadsheet that loads its data from a web page as a web
query/external data range. The amount of data on the web page varies, what I want is to have a range (which I can then chart or whatever) that sets itself to "all the data in column C" (for example). How can I make the range "fit itself" to the available data? Is there some fancy kind of range that does this? Or, is there a way to have a macro automatically run after the web query (and then I can make the macro do the right thing)? Thanks! Chris |
How update range after web query?
try using a defined name for the range.
insertnamedefinecolCrefers to =offset($c$1,0,0,counta($c:$c),1) -- Don Guillett SalesAid Software "Chris Shearer Cooper" wrote in message ... I've got a spreadsheet that loads its data from a web page as a web query/external data range. The amount of data on the web page varies, what I want is to have a range (which I can then chart or whatever) that sets itself to "all the data in column C" (for example). How can I make the range "fit itself" to the available data? Is there some fancy kind of range that does this? Or, is there a way to have a macro automatically run after the web query (and then I can make the macro do the right thing)? Thanks! Chris |
How update range after web query?
Chris
You may be able to use the ResultRange property of the QueryTable. If you only want column C and QT is cols A - F, for example, you can use Set Rng = Sheet1.QueryTables(1).ResultRange.Columns(3) and Rng will be the appropriate number of rows. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Chris Shearer Cooper" wrote in message ... I've got a spreadsheet that loads its data from a web page as a web query/external data range. The amount of data on the web page varies, what I want is to have a range (which I can then chart or whatever) that sets itself to "all the data in column C" (for example). How can I make the range "fit itself" to the available data? Is there some fancy kind of range that does this? Or, is there a way to have a macro automatically run after the web query (and then I can make the macro do the right thing)? Thanks! Chris |
All times are GMT +1. The time now is 03:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com