Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 65
Default Import data and macro

I have a spreadsheet that uses a web query to gather data. Everyday I
refresh this query and copy and paste the date it imports into another tab.
I do not overwrite the data from previous days. I just copy and paste the
data below the previous days. Is there some way I can have excel do this
automatically? Maybe some kind of macro? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Import data and macro


I do this all the time for myself and clients. Just determine the next
available row in the destination sheet and copy to that

lr=sheets("dest").cells(rows.count,"a").end(xlup). row+1
range("myrange").copy sheets("dest").range("a" & lr)
or
with sheets("dest")
lr=.cells(.rows.count,"a").end(xlup).row+1
range("myrange").copy .range("a" & lr)
end with


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jambruins" wrote in message
...
I have a spreadsheet that uses a web query to gather data. Everyday I
refresh this query and copy and paste the date it imports into another
tab.
I do not overwrite the data from previous days. I just copy and paste the
data below the previous days. Is there some way I can have excel do this
automatically? Maybe some kind of macro? Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 65
Default Import data and macro

Don, I am not very familiar with macro's. Is that a formula I should put in
in the destination cell or is that something I need to incorporate into the
macro? Thanks for the help.

"Don Guillett" wrote:


I do this all the time for myself and clients. Just determine the next
available row in the destination sheet and copy to that

lr=sheets("dest").cells(rows.count,"a").end(xlup). row+1
range("myrange").copy sheets("dest").range("a" & lr)
or
with sheets("dest")
lr=.cells(.rows.count,"a").end(xlup).row+1
range("myrange").copy .range("a" & lr)
end with


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jambruins" wrote in message
...
I have a spreadsheet that uses a web query to gather data. Everyday I
refresh this query and copy and paste the date it imports into another
tab.
I do not overwrite the data from previous days. I just copy and paste the
data below the previous days. Is there some way I can have excel do this
automatically? Maybe some kind of macro? Thanks.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 65
Default Import data and macro

Don,
Email sent. Thank you very much.

"Don Guillett" wrote:

It is part of a macro. Send me a workbook (to the address below) along with
very detailed instructions as to what you need. Also send snippets of these
posts so I will know where it came from.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jambruins" wrote in message
...
Don, I am not very familiar with macro's. Is that a formula I should put
in
in the destination cell or is that something I need to incorporate into
the
macro? Thanks for the help.

"Don Guillett" wrote:


I do this all the time for myself and clients. Just determine the next
available row in the destination sheet and copy to that

lr=sheets("dest").cells(rows.count,"a").end(xlup). row+1
range("myrange").copy sheets("dest").range("a" & lr)
or
with sheets("dest")
lr=.cells(.rows.count,"a").end(xlup).row+1
range("myrange").copy .range("a" & lr)
end with


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jambruins" wrote in message
...
I have a spreadsheet that uses a web query to gather data. Everyday I
refresh this query and copy and paste the date it imports into another
tab.
I do not overwrite the data from previous days. I just copy and paste
the
data below the previous days. Is there some way I can have excel do
this
automatically? Maybe some kind of macro? Thanks.






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Import data and macro

Use this

Sub copyvalues()
dlr = Sheets("Odds").Cells(Rows.Count, "a").End(xlUp).Row + 1
'MsgBox dlr
With Sheets("Pinny")
slr = Application.CountA(.Columns("c")) - 1
'MsgBox slr
..Range(.Cells(1, "o"), .Cells(slr, "q")).Copy
Sheets("Odds").Cells(dlr, 1).PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jambruins" wrote in message
...
Don,
Email sent. Thank you very much.

"Don Guillett" wrote:

It is part of a macro. Send me a workbook (to the address below) along
with
very detailed instructions as to what you need. Also send snippets of
these
posts so I will know where it came from.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jambruins" wrote in message
...
Don, I am not very familiar with macro's. Is that a formula I should
put
in
in the destination cell or is that something I need to incorporate into
the
macro? Thanks for the help.

"Don Guillett" wrote:


I do this all the time for myself and clients. Just determine the next
available row in the destination sheet and copy to that

lr=sheets("dest").cells(rows.count,"a").end(xlup). row+1
range("myrange").copy sheets("dest").range("a" & lr)
or
with sheets("dest")
lr=.cells(.rows.count,"a").end(xlup).row+1
range("myrange").copy .range("a" & lr)
end with


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jambruins" wrote in message
...
I have a spreadsheet that uses a web query to gather data. Everyday
I
refresh this query and copy and paste the date it imports into
another
tab.
I do not overwrite the data from previous days. I just copy and
paste
the
data below the previous days. Is there some way I can have excel do
this
automatically? Maybe some kind of macro? Thanks.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import Data with Macro or VBA sahafi Setting up and Configuration of Excel 0 September 1st 06 06:34 PM
Import Data Excel Macro [email protected] Excel Discussion (Misc queries) 3 August 23rd 06 02:11 PM
in an excel macro can you import data from word into a cell? Trefor Excel Discussion (Misc queries) 11 October 6th 05 01:49 PM
import data with macro chris_rip Excel Discussion (Misc queries) 0 July 18th 05 08:40 PM
import data using macro chris_rip Excel Discussion (Misc queries) 0 July 18th 05 08:32 PM


All times are GMT +1. The time now is 05:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"