Single Copy and Multiple Paste - VBA

monirg

Well-known Member
Joined
Jan 11, 2005
Messages
629
Hi;
Would appreciate your help on this (simple) question!
Having selected and copied a range, how can I paste the selection to multiple individual cells using a single VBA statement ??
It would look much better than:
----------------------------------------------
Selection.Copy
.........................................................
...Range("L20").Select
...ActiveSheet.Paste
...Range("M20").Select
...ActiveSheet.Paste
...Range("N20").Select
...ActiveSheet.Paste
........................................................
.....(repeat 10 or 15 times)..................
.......................................................

Thank you.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
You could try this:
Code:
Selection.Copy Range("L20:N20")
This might cause problems depending on the size of the source/destination.

Perhaps you could explain further exactly what you are trying to do?
 
Upvote 0
Norie;

Thanks for your suggestion. Sorry my example wasn't clear. The detination cells are non-contiguous, say, L20, N20, P20, T20, etc.

I got the idea! I suppose I can use:
.............Selection.Copy Range("L20, N20, P20, T20, ...")

The size of the source range is about 20 cells, and it represents the initial values before an algoritm kicks in! Will try very soon and let you know.

(Do you realy live in Stirling, Scotland ? I did live in Glasgow sometime ago!)

Regards.
 
Upvote 0

Forum statistics

Threads
1,214,960
Messages
6,122,479
Members
449,088
Latest member
Melvetica

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top