Which is faster code...

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.)
 
K

kkknie

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top