ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   multiple cells copy & paste (https://www.excelbanter.com/excel-programming/401972-multiple-cells-copy-paste.html)

aw

multiple cells copy & paste
 
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



--
aw

joel

multiple cells copy & paste
 
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:B 4").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:B 4").copy
workbooks("book2.xls")sheets("sheet1").Range("A1") . _
PasteSpecial Paste:=xlPasteValues
End Sub

"aw" wrote:

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



--
aw



All times are GMT +1. The time now is 08:53 AM.

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