Which is faster code...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I believe option one is faster. Can anyone confirm? The goal is to copy a
value from one cell (in one workbook) to a cell in another workbook.

1)
myrange1.value = myrange2.value

2)
myrange2.copy
myrange1.paste

(Note: I know the above code is incorrect syntax, but I think you get the
idea of what I mean.)
 
For just a single copy/paste operation, there's not much difference.
For a bunch of them, the first way is much faster (I cleaned u
someone's code a year back to prove it!). The only difference (a
Frank mentioned) is that you will not get the formatting or formulas o
the copied cell, just the value.
 
Back
Top