Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Copying formulas to other workbooks

I have a workbook title "Book1" which contains formulas
on Sheet1. If I highlight all these formulas and paste them
into Sheet1 of "Book2", then the formulas in Book2 will
contain references to "Book1".

How can I paste everything into "Book2" without all those
references to "Book1" in the formulas???

thank u


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Copying formulas to other workbooks

Hi Robert

The way I see it you have three options. You can paste the values,
though you would have already thought of that. If your two worksheets
are identical you could paste it across and find the references in a
block something like

Find '[Book1.xls]Sheet1'!

Replace with nothing in the replace box

This will remove all of the references to the first workbook.

Finally you could break the links though this has the same result as
the first option in that it hard codes everything. Anyways just some
suggestions.

Take care

Marcus
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 833
Default Copying formulas to other workbooks


I have 2 EXCEL 2007 files up on the screen in front of me.

1. The first one is called Robert_Crandal

- the second one is called Robert_Crandal2

2. In cell C14 of:-

Robert_Crandal

- I have:-

=(A14+B14)

3. In the above mentioned cell C14 do a Ctrl-C.

4. Now click on the other file (already open) called:-

Robert_Crandal2

Go to cell C14 (for example, this can, of course, be any cell of your
choice) then:-

Home / Paste / Paste

5. All that now appears in cell C14 of:-

Robert_Crandal2

- is:-

=(A14+B14)

6. I think that the above gives you what you want.

If my comments have helped please hit Yes.
Thanks.




"Robert Crandal" wrote:

I have a workbook title "Book1" which contains formulas
on Sheet1. If I highlight all these formulas and paste them
into Sheet1 of "Book2", then the formulas in Book2 will
contain references to "Book1".

How can I paste everything into "Book2" without all those
references to "Book1" in the formulas???

thank u


.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Copying formulas to other workbooks

Maybe in code use the ChangeLink method

This example changes a Microsoft Excel link.

ActiveWorkbook.ChangeLink "c:\excel\book1.xls", _
"c:\excel\book2.xls", xlExcelLinksMike F"Robert Crandal"
wrote in message
...
I have a workbook title "Book1" which contains formulas
on Sheet1. If I highlight all these formulas and paste them
into Sheet1 of "Book2", then the formulas in Book2 will
contain references to "Book1".

How can I paste everything into "Book2" without all those
references to "Book1" in the formulas???

thank u




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Copying formulas to other workbooks

not tested but see if this approach does what you want:

Sub CopyPasteFormulas()
Dim rng As Range
Dim rng2 As Range

'worksheet & range where formulas located
'change as require
Set rng = ThisWorkbook.Worksheets("Sheet1").Range("C4:E8")

'destination workbook / worksheet & range
'change as required
Set rng2 = Workbooks("Book2").Worksheets("Sheet1").Range("C4: E8")

rng.Copy

rng2.PasteSpecial _
Paste:=xlPasteFormulas, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False

Application.CutCopyMode = False
End Sub
--
jb


"Robert Crandal" wrote:

I have a workbook title "Book1" which contains formulas
on Sheet1. If I highlight all these formulas and paste them
into Sheet1 of "Book2", then the formulas in Book2 will
contain references to "Book1".

How can I paste everything into "Book2" without all those
references to "Book1" in the formulas???

thank u


.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Copying formulas to other workbooks

trip

What if you have =Sheet1!A14 + B14 in Robert_Crandal C14?

What happens to your copy/paste to Robert_Crandal2


Gord Dibben MS Excel MVP

On Thu, 17 Dec 2009 03:29:01 -0800, trip_to_tokyo
wrote:


I have 2 EXCEL 2007 files up on the screen in front of me.

1. The first one is called Robert_Crandal

- the second one is called Robert_Crandal2

2. In cell C14 of:-

Robert_Crandal

- I have:-

=(A14+B14)

3. In the above mentioned cell C14 do a Ctrl-C.

4. Now click on the other file (already open) called:-

Robert_Crandal2

Go to cell C14 (for example, this can, of course, be any cell of your
choice) then:-

Home / Paste / Paste

5. All that now appears in cell C14 of:-

Robert_Crandal2

- is:-

=(A14+B14)

6. I think that the above gives you what you want.

If my comments have helped please hit Yes.
Thanks.




"Robert Crandal" wrote:

I have a workbook title "Book1" which contains formulas
on Sheet1. If I highlight all these formulas and paste them
into Sheet1 of "Book2", then the formulas in Book2 will
contain references to "Book1".

How can I paste everything into "Book2" without all those
references to "Book1" in the formulas???

thank u


.


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
Copying Workbooks and keeping the formulas only? John Excel Discussion (Misc queries) 3 September 12th 08 08:45 PM
Copy formulas between workbooks without copying links MCI Excel Discussion (Misc queries) 8 May 11th 08 05:36 AM
Copy formulas between workbooks without copying links MCI Excel Programming 4 May 9th 08 06:40 AM
Copying formulas between workbooks Zoomnbyu Excel Discussion (Misc queries) 0 March 19th 08 07:34 PM
Copying formulas between workbooks - help needed DaveJ Excel Programming 1 May 14th 05 07:08 AM


All times are GMT +1. The time now is 04:30 PM.

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"