Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
GMCAR3
 
Posts: n/a
Default Extracting Data from another spreadsheet

Hi,

I'm trying to write a macro that will take data from one
spreadsheet and put it into another then hard code it.
The formulas are hard coded because the spreadsheet that
the data is coming from changes. Each time it changes I
want to run a macro to put the data into another sheet.
How do I tell it, when the data is extracted to put it in
the first available/empty row? The macro that I did, just
writes over the previous data that was extracted. By the
way, I'm using Excel 97 on a Windows2000 workstation.
  #2   Report Post  
Basil
 
Posts: n/a
Default

Assuming that you have a process that works (bar overwriting old data), when
selecting the sheet to paste the data to, you could select a named range on
the sheet and then paste.

This named range would be dynamic looking at the first blank row.

Say you have data from row 1 to row 30, I assume you would want to paste to
cell A1.

NamedRange: =OFFSET(Sheet1!$A$1,COUNTA(Sheet1!$A:$A),,)

In your VBA code
<your code.Range("NamedRange").Paste........

This would always paste to the highest available blank cell.

Hope it helps,

Basil

"GMCAR3" wrote:

Hi,

I'm trying to write a macro that will take data from one
spreadsheet and put it into another then hard code it.
The formulas are hard coded because the spreadsheet that
the data is coming from changes. Each time it changes I
want to run a macro to put the data into another sheet.
How do I tell it, when the data is extracted to put it in
the first available/empty row? The macro that I did, just
writes over the previous data that was extracted. By the
way, I'm using Excel 97 on a Windows2000 workstation.

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
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Importing Data From Another Spreadsheet Tiziano Excel Discussion (Misc queries) 6 January 7th 05 02:35 AM
Entering data on template and then data going to a spreadsheet. KJH Excel Discussion (Misc queries) 3 December 24th 04 01:04 AM
How can I transpose data from a spreadsheet into a form that does. Joby Excel Worksheet Functions 3 November 30th 04 04:50 PM
Data Filter - Not all rows in spreadsheet will display in Autofilt Excel Help Excel Worksheet Functions 1 November 17th 04 05:40 PM


All times are GMT +1. The time now is 05:42 PM.

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"