Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Worksheet.copy changes references

Hi everybody,

We've got a problem with a macro in Excel. The macro
copies 2 worksheets to a new document. Worksheet A has
some formulas referencing cells on Worksheet B. First B is
copied to the new workbook, then A. The formulas on the
copied worksheet A are now referencing the original cell
of worksheet B, instead of the copied ones in the same
workbook.

Can anybody tell me how to keep the references within the
same workbook?

Thanks in advance,

Marco.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Worksheet.copy changes references

If the addresses in the copied "worksheet B" are exactly identical to the
new addresses A1 = A1, then you could use local addresses. NewAddress =
Myrange.Address(false,false).
ActiveCell.Formula = NewAddress
You might have to write formulas like = NewAddress1 & "+" & NewAddress2

Ole Michelsen


"Marco" wrote in message
...
Hi everybody,

We've got a problem with a macro in Excel. The macro
copies 2 worksheets to a new document. Worksheet A has
some formulas referencing cells on Worksheet B. First B is
copied to the new workbook, then A. The formulas on the
copied worksheet A are now referencing the original cell
of worksheet B, instead of the copied ones in the same
workbook.

Can anybody tell me how to keep the references within the
same workbook?

Thanks in advance,

Marco.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Worksheet.copy changes references

One option is to copy both worksheets at the same time.

Another is to convert your formulas to text, copy the worksheet, and change the
text formulas back to formulas

Essentially...
edit|replace
what: =
with: $$$$$$=
replace all

copy the sheet(s)

then edit|replace
what: $$$$$$=
with: =
replace all

One more option is to point at your new workbook: Edit|links|change source

Marco wrote:

Hi everybody,

We've got a problem with a macro in Excel. The macro
copies 2 worksheets to a new document. Worksheet A has
some formulas referencing cells on Worksheet B. First B is
copied to the new workbook, then A. The formulas on the
copied worksheet A are now referencing the original cell
of worksheet B, instead of the copied ones in the same
workbook.

Can anybody tell me how to keep the references within the
same workbook?

Thanks in advance,

Marco.


--

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 of a Worksheet Does Not Update Chart References HoboDan Excel Worksheet Functions 0 February 3rd 09 06:12 PM
how do I copy R[40]C1 references Peter Excel Worksheet Functions 0 August 17th 06 03:50 PM
Copy worksheet with row & column references ERudy Excel Discussion (Misc queries) 1 May 12th 06 10:08 PM
copy/Paste references other worksheet Ivano Excel Worksheet Functions 4 April 1st 06 01:06 AM
Copy worksheet without absolutle references GRIFFO Excel Worksheet Functions 3 May 18th 05 11:15 PM


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