multiple cells copy & paste

A

aw

I would like to check the fastest way how to copy A1 ~ E10 ‘s cell content to
another worksheet but have following criteria :


A B C D E
1
2 9 9
3 9 9
4 xxxxxx xxxxxx xxxxxx xxxxxx
5 9 9
6 xxxxxx xxxxxx
7 9 9
8 9 9 9 9
9 xxxxxx xxxxxx
10 xxxxxx xxxxxx



1. Cells marked ‘9’ (complex formula in source worksheet) need convert into
value under the target worksheet
2. Cells marked ‘xxxxxx’ (pre-defined formula in target worksheet) should
remain unchanged / not affect by copying action in criteria (1) above

Actually I just want to know is the method of copying multiply cells into
another worksheet just by 1 action. (the ‘shape’ of source & target should be
the same)

Copy to / from clipboard seems not the method I want as it is easy to have
error especially if you need to copy & paste a thousand of separate region.

If possible pls give me some hints for VB to pick up this action.

Tx
 
J

Joel

The best method is to use the "copy" and then the pastespecial to paste
values only. If you were doing a copy of just cells then use

workbooks("book1.xls")sheets("sheet1").Range("A1:B4").copy _
destination:=workbooks("book2.xls")sheets("sheet1").Range("A1")

Because you need pastespecial you must do it in two instructions

workbooks("book1.xls")sheets("sheet1").Range("A1:B4").copy
workbooks("book2.xls")sheets("sheet1").Range("A1"). _
PasteSpecial Paste:=xlPasteValues
End Sub
 

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