Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy cells to variable number of rows | Excel Discussion (Misc queries) | |||
Insert Variable Number of Rows; With Loop | Excel Worksheet Functions | |||
sum and variable rows | Excel Worksheet Functions | |||
How do I assign a text value to a variable number of rows? | Excel Worksheet Functions | |||
DDE linking with variable from named cell! | Links and Linking in Excel |