ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Use Macro to Copy and paste formulas from one spreadsheet to anoth (https://www.excelbanter.com/excel-discussion-misc-queries/244699-use-macro-copy-paste-formulas-one-spreadsheet-anoth.html)

bevchapman

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?

Mike H

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?


bevchapman

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?


Jacob Skaria

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?



All times are GMT +1. The time now is 12:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com