0

I need to copy all the cells from one sheet to another sheet in a different workbook.

I'm currently using:

originSheet.cells.copy destination:=destSheet.range("a1")

but it takes several minutes to execute. I guess a faster solution would be to copy the entire sheet but then I would have to change all my formulas on the destination workbook.

Can you help me speed up this code?

  • 1
    How big is the range in question? Do you actually need to copy all of it? could you possibly use something `UsedRange` instead of `Cells`? – cybernetic.nomad Jun 14 '23 at 18:59
  • 2
    Why not just duplicate the sheet into the destination? If you disable the formulae by replacing the "=" with "xyxyxy" then once it is duplicated change it back. Works for me as I use a macro copying an answer calculation sheet into 150 workbooks. – Solar Mike Jun 14 '23 at 19:03
  • @cybernetic.nomad UsedRange works well, thanks. I used Cells in the past and it wasn't slow. It was slow with this particular workbook maybe because there are a lot o merged cells or maybe because there are a lot of columns, not sure. – Teodor Patriche Jul 03 '23 at 17:48

0 Answers0