Copy and Paste Multiple Times

djb14128

New Member
Joined
Nov 14, 2019
Messages
27
I just want to know why I am the Visual Basic Applications (VBA) script isn't working as it should be. I am trying to copy and paste multiple tables, depending on the value I put into cell E1. I've used this code here:

Sub CopyMulti()
Range("A3:D19").Copy Range("E15").Resize(14 * Range("E1").Value)
End Sub

Many thanks.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi & welcome to MrExcel.
It should be
Code:
Range("A3:D19").Copy Range("E15").Resize([COLOR=#ff0000]17[/COLOR] * Range("E1").Value)
 
Upvote 0
ABCDEFGHIJKLMNO
15
2Button 1
3
4ApplesBananasOranges
52=B5+10=C5*B5
64=B6+20=C6*B6
76=B7+30=C7*B7
88=B8+40=C8*B8
910=B9+50=C9*B9
1012=B10+60=C10*B10
1114=B11+70=C11*B11
1216=B12+80=C12*B12
1318=B13+90=C13*B13
1420=B14+100=C14*B14
1522=B15+110=C15*B15
1624=B16+120=C16*B16ApplesBananasOranges
1721224
1842496
19636216
20848384
211060600
221272864
2314841176
2416961536
25181081944
26201202400
27221322904
28241443456
29
30

<tbody>
</tbody>

This is what the excel spreadsheet looks like.
 
Upvote 0
In future please do not make the same post multiple times. Note that sometimes posts from new users require Moderator approval before you can see them on the public forums. When this happens, you should see a message to that effect when you try to post it. Please be patient and do not attempt to post the question again.

What does the 17 mean? Many thanks.
It is the number of rows that you are originally copying.

Why does it not work for longer/more complex excel spreadsheet? Many thanks.
It would help if you explain what you are trying to do.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,809
Members
449,048
Latest member
greyangel23

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