Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RFJ RFJ is offline
external usenet poster
 
Posts: 25
Default Linking to a Variable Number of Rows - XP/07

Each month I receive an excel file of transactions taken off a finance
system. It comprises a standard 20 columns but the number of rows can vary
from 600 to 800.

There is then a standard spreadsheet used to analyse the data.

Is there a formula or solution that I can use in the analysis spreadsheet
that, once the name of the transaction worksheet is given, would import or
link to the required data and bring in just the required number of rows.

TIA

Rob


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Linking to a Variable Number of Rows - XP/07

Via formulas?

I don't think so.

Maybe it's time to think about using a macro to copy that sheet's .usedrange(!)
to the new location.

RFJ wrote:

Each month I receive an excel file of transactions taken off a finance
system. It comprises a standard 20 columns but the number of rows can vary
from 600 to 800.

There is then a standard spreadsheet used to analyse the data.

Is there a formula or solution that I can use in the analysis spreadsheet
that, once the name of the transaction worksheet is given, would import or
link to the required data and bring in just the required number of rows.

TIA

Rob


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RFJ RFJ is offline
external usenet poster
 
Posts: 25
Default Linking to a Variable Number of Rows - XP/07

I think ( no - I know) you've just moved me out of my competence zone :(

Can sks help out on a .usedrange(!) macro or other solution.



"Dave Peterson" wrote in message
...
Via formulas?

I don't think so.

Maybe it's time to think about using a macro to copy that sheet's
.usedrange(!)
to the new location.

RFJ wrote:

Each month I receive an excel file of transactions taken off a finance
system. It comprises a standard 20 columns but the number of rows can
vary
from 600 to 800.

There is then a standard spreadsheet used to analyse the data.

Is there a formula or solution that I can use in the analysis spreadsheet
that, once the name of the transaction worksheet is given, would import
or
link to the required data and bring in just the required number of rows.

TIA

Rob


--

Dave Peterson



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Linking to a Variable Number of Rows - XP/07

Open the workbook that contains the new data
Open the workbook that gets the new data

(And without any details...)

Option Explicit
Sub testme()

Dim RngToCopy As Range
Dim DestCell As Range

Set RngToCopy = Workbooks("newdatawkbknamehere.xls") _
.Worksheets("sheet9999").UsedRange

Set DestCell = Workbooks("otherwkbknamehere.xls") _
.Worksheets("sheet8888").Range("a1")

'wipe out existing data????
DestCell.parent.cells.clearcontents

RngToCopy.Copy _
Destination:=DestCell

End Sub



If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm



RFJ wrote:

I think ( no - I know) you've just moved me out of my competence zone :(

Can sks help out on a .usedrange(!) macro or other solution.

"Dave Peterson" wrote in message
...
Via formulas?

I don't think so.

Maybe it's time to think about using a macro to copy that sheet's
.usedrange(!)
to the new location.

RFJ wrote:

Each month I receive an excel file of transactions taken off a finance
system. It comprises a standard 20 columns but the number of rows can
vary
from 600 to 800.

There is then a standard spreadsheet used to analyse the data.

Is there a formula or solution that I can use in the analysis spreadsheet
that, once the name of the transaction worksheet is given, would import
or
link to the required data and bring in just the required number of rows.

TIA

Rob


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RFJ RFJ is offline
external usenet poster
 
Posts: 25
Default Linking to a Variable Number of Rows - XP/07

Neat <G

Much appreciated

"Dave Peterson" wrote in message
...
Open the workbook that contains the new data
Open the workbook that gets the new data

(And without any details...)

Option Explicit
Sub testme()

Dim RngToCopy As Range
Dim DestCell As Range

Set RngToCopy = Workbooks("newdatawkbknamehere.xls") _
.Worksheets("sheet9999").UsedRange

Set DestCell = Workbooks("otherwkbknamehere.xls") _
.Worksheets("sheet8888").Range("a1")

'wipe out existing data????
DestCell.parent.cells.clearcontents

RngToCopy.Copy _
Destination:=DestCell

End Sub



If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm



RFJ wrote:

I think ( no - I know) you've just moved me out of my competence zone :(

Can sks help out on a .usedrange(!) macro or other solution.

"Dave Peterson" wrote in message
...
Via formulas?

I don't think so.

Maybe it's time to think about using a macro to copy that sheet's
.usedrange(!)
to the new location.

RFJ wrote:

Each month I receive an excel file of transactions taken off a finance
system. It comprises a standard 20 columns but the number of rows can
vary
from 600 to 800.

There is then a standard spreadsheet used to analyse the data.

Is there a formula or solution that I can use in the analysis
spreadsheet
that, once the name of the transaction worksheet is given, would
import
or
link to the required data and bring in just the required number of
rows.

TIA

Rob

--

Dave Peterson


--

Dave Peterson



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
Copy cells to variable number of rows Acct Supr - DCTC Excel Discussion (Misc queries) 5 September 26th 09 12:58 PM
Insert Variable Number of Rows; With Loop ryguy7272 Excel Worksheet Functions 2 December 27th 06 08:25 PM
sum and variable rows Jim Excel Worksheet Functions 4 September 7th 05 07:48 PM
How do I assign a text value to a variable number of rows? Jday Excel Worksheet Functions 6 June 20th 05 01:46 PM
DDE linking with variable from named cell! Ben Joiner Links and Linking in Excel 1 March 24th 05 11:32 PM


All times are GMT +1. The time now is 10:15 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"