Importing data

G

George

hi

I would like to import data from the web and although this is quite simple
in Excel 2003 the new data (that comes in upon refresh) replaces the old. I
was wondering if there is a way to keep previous history of the data, make
Excel fill in adjacent cells with the new data for example.

Thanks for taking the time to read this

George
 
G

Guest

hi,
if you are using Microsoft query, the answer would be no.
The Micorsoft query becomes a named range in excel that
is linked to the query. by desing it expands and contracts
at refresh to accommidate new data.
I think to accomplish what you want you might new a macro
to copy the data prior to refresh.
this is a little more complicated than a simple copy but
if you use the copy command, you would be coping the MSQ
too.
Sub macSetRange()
Dim rng As Range
Dim rng1 As Range
Dim rcnt As Long
Dim ccnt As Long
Set rng = Range(Range("A1"), Range("A1").End(xlDown).Offset
(0, 1))'set the 1 to the number of columns you have
'rng.Select
rcnt = rng.Rows.Count - 1
ccnt = rng.Columns.Count - 1
Set rng1 = Range(Range("K1"), Range("K1").Offset(rcnt,
ccnt))
rng1.Value = rng.Value
rng.select
selection.querytable.refresh Backgroundquery:=false
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top