Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Macro for Adding Lines to Linked Spreadsheets

I need to create a macro for adding additional rows from one linked
spreadsheet to another.
I have two workbooks that have spreadsheets that are linked.
Workbook 1: which has spreadsheets with rows of material added daily.
Workbook 2: which is linked into workbook 1 and "copies" those sheets
exactly through formulas in the cells provided by the link.
However, I have to manually add the new rows in workbook 2 to accomodate the
new row material added in workbook 1. Is there a macro formula to add the
additional lines and carry the formulas down? I'm trying to save some steps
in making sure the linked spreadsheets are cohesive.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 329
Default Macro for Adding Lines to Linked Spreadsheets

Hi Irishimp23,

If your linking is in the form of a simple
='[ExternalWorkbook.xls]WorkSheetName'!A1
formula, you could change this to:
=IF('[ExternalWorkbook.xls]WorkSheetName'!A1="","",='[ExternalWorkbook.xls]WorkSheetName'!A1)
and copy down & across at least as far as you're likely to need.
If you need to allow for rows/columns being added or deleted in the middle of the range, you could change this to
=IF(OFFSET('[ExternalWorkbook.xls]WorkSheetName'!$A$1,ROW()-1,COLUMN()-1)="","",OFFSET('[ExternalWorkbook.xls]WorkSheetName'!$A$1,ROW()-1,COLUMN()-1))
and copy down & across at least as far as you're likely to need.

The only things you need to watch with either approach is that (a) if you add new rows/columns to the source workbook, your formulae
in the target workbook still cover sufficent cells and (b) the results won't carrying over any consequntial formatting changes.

Cheers

--
macropod
[MVP - Microsoft Word]
-------------------------

"Irishimp23" wrote in message ...
I need to create a macro for adding additional rows from one linked
spreadsheet to another.
I have two workbooks that have spreadsheets that are linked.
Workbook 1: which has spreadsheets with rows of material added daily.
Workbook 2: which is linked into workbook 1 and "copies" those sheets
exactly through formulas in the cells provided by the link.
However, I have to manually add the new rows in workbook 2 to accomodate the
new row material added in workbook 1. Is there a macro formula to add the
additional lines and carry the formulas down? I'm trying to save some steps
in making sure the linked spreadsheets are cohesive.


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
Connecting Linked Spreadsheets Steve C Excel Discussion (Misc queries) 0 February 22nd 06 05:04 PM
Adding rows in linked spreadsheets Parcey Excel Discussion (Misc queries) 1 December 28th 05 06:28 AM
linked spreadsheets Mifty New Users to Excel 6 September 10th 05 12:10 PM
Linked Excel Spreadsheets MAB Excel Discussion (Misc queries) 0 March 24th 05 02:51 PM
Linked Excel Spreadsheets MAB Links and Linking in Excel 0 March 23rd 05 09:59 PM


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