I am very new to VBA.I know its a basic doubt but couldnt find the solution anywhere. I am trying to copy 24 (A1:A24)values and paste it number of times in (A25:A8760).I am able to copy a single value and paste it number of times.I couldnt do it for multiple values.
Sub Macro1()
Range("a1").Select
Selection.Copy
Range("a2:a30").Select
ActiveSheet.Paste
End Sub
How do i do it if i multiple values?
Sub Macro1()
Range("a1:a24").Select
Selection.Copy
Now i need to paste the above 24 values to (A25:A8760) continously? Thanks
The following will copy and past 364 times...
At first I thought this:
Range("A1:A24").Copy Range("A25:A8760")
orRange("A25:A8760").Value = Range("A1:A24").Value
should work. However it doesn't, because above solutions copy only in "used" part of the sheet.Then I come up with following solution (copies only values):
UPD:
this code works:
Notes:
I used
Range("A25:A8760").Value = ""
to make this range to be part ofUsedRange
(otherwise lineRange("A1:A24").Copy Range("A25:A8760")
would copy only in "used" part of the sheet)