PC Review


Reply
Thread Tools Rate Thread

Copy formulas between workbooks without copying links

 
 
MCI
Guest
Posts: n/a
 
      4th May 2008
I want to copy formulas from a range in worksheet A in workbook A to a
range in worksheet B in workbook B.

When i use the clipboard to copy and paste special by formulas, I
often create unwanted external links in workbook B (eg. some names in
workbook B could refer to the ranges in workbook A now).
While i could possible fix this later by looking for the external
links and delete them, I'm looking for a simple way to avoid it.

One possible way is do it in VBA:

workbooks(2).sheets(1).range("A1:A10").formula =
workbooks(1).sheets(1).range("A1:A10").formula

but looks like this only works for non-array formulas

thanks a lot, any help is much appreciated.
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      4th May 2008
It sometimes help to do the copy using the fx box at the top of the
worksheet. click on the cell you want to copy. then highlight the formula
in the Fx box and do a copy. then paste the formula in the Fx box in the 2nd
worksheet.

"MCI" wrote:

> I want to copy formulas from a range in worksheet A in workbook A to a
> range in worksheet B in workbook B.
>
> When i use the clipboard to copy and paste special by formulas, I
> often create unwanted external links in workbook B (eg. some names in
> workbook B could refer to the ranges in workbook A now).
> While i could possible fix this later by looking for the external
> links and delete them, I'm looking for a simple way to avoid it.
>
> One possible way is do it in VBA:
>
> workbooks(2).sheets(1).range("A1:A10").formula =
> workbooks(1).sheets(1).range("A1:A10").formula
>
> but looks like this only works for non-array formulas
>
> thanks a lot, any help is much appreciated.
>

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      4th May 2008
One simple method is to use Edit>Replace a couple times.

Edit>Replace

What: =

With: ^^^

Replace all.

Copy then reverse the process on the target book.

Close the source book without saving or reverse there also.


Gord Dibben MS Excel MVP

On Sat, 3 May 2008 19:53:29 -0700 (PDT), MCI <(E-Mail Removed)> wrote:

>I want to copy formulas from a range in worksheet A in workbook A to a
>range in worksheet B in workbook B.
>
>When i use the clipboard to copy and paste special by formulas, I
>often create unwanted external links in workbook B (eg. some names in
>workbook B could refer to the ranges in workbook A now).
>While i could possible fix this later by looking for the external
>links and delete them, I'm looking for a simple way to avoid it.
>
>One possible way is do it in VBA:
>
>workbooks(2).sheets(1).range("A1:A10").formula =
>workbooks(1).sheets(1).range("A1:A10").formula
>
>but looks like this only works for non-array formulas
>
>thanks a lot, any help is much appreciated.


 
Reply With Quote
 
MCI
Guest
Posts: n/a
 
      5th May 2008
thanks a lot, but this doesn't seem to work for array formulas.
for example, in source workbook, range("D910") has an array formula
of "=A1:A2",
using your way described below, in destination workbook, we would
have:
cell D9 = "=A1:A2"
cell D10 = "=A1:A2"

which gives "#VALUE!" errors and is different from the source
workbook.


On May 4, 1:39 pm, Gord Dibben <gorddibbATshawDOTca> wrote:
> One simple method is to use Edit>Replace a couple times.
>
> Edit>Replace
>
> What: =
>
> With: ^^^
>
> Replace all.
>
> Copythen reverse the process on the target book.
>
> Close the source book without saving or reverse there also.
>
> Gord Dibben MS Excel MVP
>
> On Sat, 3 May 2008 19:53:29 -0700 (PDT), MCI <330...@gmail.com> wrote:
> >I want tocopyformulasfrom a range in worksheet A in workbook A to a
> >range in worksheet B in workbook B.

>
> >When i use the clipboard tocopyand paste special byformulas, I
> >often create unwanted external links in workbook B (eg. some names in
> >workbook B could refer to the ranges in workbook A now).
> >While i could possible fix this later by looking for the external
> >links and delete them, I'm looking for a simple way to avoid it.

>
> >One possible way is do it in VBA:

>
> >workbooks(2).sheets(1).range("A1:A10").formula =
> >workbooks(1).sheets(1).range("A1:A10").formula

>
> >but looks like this only works for non-arrayformulas

>
> >thanks a lot, any help is much appreciated.


 
Reply With Quote
 
Kim
Guest
Posts: n/a
 
      9th May 2008
Great tip, works a treat and saved me a pile of work when I'd mucked up the
formulas on a workbook that I'd used as the template for 15 others.

"Gord Dibben" wrote:

> One simple method is to use Edit>Replace a couple times.
>
> Edit>Replace
>
> What: =
>
> With: ^^^
>
> Replace all.
>
> Copy then reverse the process on the target book.
>
> Close the source book without saving or reverse there also.
>
>
> Gord Dibben MS Excel MVP
>
> On Sat, 3 May 2008 19:53:29 -0700 (PDT), MCI <(E-Mail Removed)> wrote:
>
> >I want to copy formulas from a range in worksheet A in workbook A to a
> >range in worksheet B in workbook B.
> >
> >When i use the clipboard to copy and paste special by formulas, I
> >often create unwanted external links in workbook B (eg. some names in
> >workbook B could refer to the ranges in workbook A now).
> >While i could possible fix this later by looking for the external
> >links and delete them, I'm looking for a simple way to avoid it.
> >
> >One possible way is do it in VBA:
> >
> >workbooks(2).sheets(1).range("A1:A10").formula =
> >workbooks(1).sheets(1).range("A1:A10").formula
> >
> >but looks like this only works for non-array formulas
> >
> >thanks a lot, any help is much appreciated.

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying formulas to other workbooks Robert Crandal Microsoft Excel Programming 5 17th Dec 2009 08:25 PM
Copying Workbooks and keeping the formulas only? John Microsoft Excel Misc 3 12th Sep 2008 08:45 PM
Copy formulas between workbooks without copying links MCI Microsoft Excel Misc 8 11th May 2008 05:36 AM
Copying formulas between workbooks Zoomnbyu Microsoft Excel Misc 0 19th Mar 2008 07:34 PM
Copying formulas between workbooks - help needed =?Utf-8?B?RGF2ZUo=?= Microsoft Excel Programming 1 14th May 2005 07:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:18 AM.