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.
 

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,216
Office Version
  1. 365
Platform
  1. Windows
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?
 

monirg

Well-known Member
Joined
Jan 11, 2005
Messages
629
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,223
Messages
5,594,908
Members
413,952
Latest member
JGer

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
Top