A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Use Macro to Copy and paste formulas from one spreadsheet to anoth



 
 
Thread Tools Display Modes
  #1  
Old October 6th, 2009, 05:20 PM posted to microsoft.public.excel.misc
bevchapman
external usenet poster
 
Posts: 16
Default Use Macro to Copy and paste formulas from one spreadsheet to anoth

I am trying to copy and paste a block of cells from one spreadsheet to
another. The original file is formulas and the destination cells must be the
same formula.

any suggestions on how to add this into a macro?
  #2  
Old October 6th, 2009, 05:31 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Use Macro to Copy and paste formulas from one spreadsheet to anoth

Hi,

Maybe this

Sheets("Sheet1").Range("A1:B10").Copy
Sheets("Sheet2").Range("A1").PasteSpecial Paste:=xlPasteFormulas

Mike

"bevchapman" wrote:

I am trying to copy and paste a block of cells from one spreadsheet to
another. The original file is formulas and the destination cells must be the
same formula.

any suggestions on how to add this into a macro?

  #3  
Old October 6th, 2009, 05:42 PM posted to microsoft.public.excel.misc
bevchapman
external usenet poster
 
Posts: 16
Default Use Macro to Copy and paste formulas from one spreadsheet to anoth

Cells I want to copy are in another workbook.

"bevchapman" wrote:

I am trying to copy and paste a block of cells from one spreadsheet to
another. The original file is formulas and the destination cells must be the
same formula.

any suggestions on how to add this into a macro?

  #4  
Old October 6th, 2009, 05:50 PM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Use Macro to Copy and paste formulas from one spreadsheet to a

Dim ws1 as Worksheet, ws2 as Worksheet

'Saved workbook will have extension like Workbooks("Book1.xls")
Set ws1 = Workbooks("Book1").Sheets("Sheet1")
Set ws2 = Workbooks("Book2").Sheets("Sheet1")

ws1.Range("A1:B10").Copy
ws2.Range("A1").PasteSpecial Paste:=xlPasteFormulas
Application.CutCopyMode = False

If this post helps click Yes
---------------
Jacob Skaria


"bevchapman" wrote:

Cells I want to copy are in another workbook.

"bevchapman" wrote:

I am trying to copy and paste a block of cells from one spreadsheet to
another. The original file is formulas and the destination cells must be the
same formula.

any suggestions on how to add this into a macro?

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.