Copy range and paste underneath "x" amount of times based on cell value

BJH1995

New Member
Joined
May 20, 2019
Messages
18
Hi All,

Some assistance if possible,

I would like to copy a dynamic range of data starting in cell "i15" and paste underneath this range the amount of times specified in cell "A17". if anyone can help?

Thanks,
 

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,203
Office Version
  1. 365
Platform
  1. Windows
Do you want to copy/paste I15 to the last row with data in col I?
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,968
Office Version
  1. 365
Platform
  1. Windows
Try this:
VBA Code:
    Range("I15").Copy Range("I16:I" & Range("A17").Value + 15)
 

BJH1995

New Member
Joined
May 20, 2019
Messages
18
Apologies if i haven't explained properly.

The range of data i have currently is within the range "I15:I20" but this will need to be dynamic as the range changes but will always start in cell "I15"

I would like to copy this range and paste underneath in the next blank cell, the amount of times which is stated within cell "A17"

If this still doesn't explain well i will upload an image.

Thanks,
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,968
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

I think I would like to see a before/after picture.
 

BJH1995

New Member
Joined
May 20, 2019
Messages
18
Hope this explains better.
 

Attachments

  • Before.JPG
    Before.JPG
    89.3 KB · Views: 5
  • After.JPG
    After.JPG
    111.9 KB · Views: 6

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,203
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

How about
VBA Code:
Sub BJH()
   With Range("I15", Range("I" & Rows.count).End(xlUp))
      .Copy .Offset(.count).Resize(.count * Range("A17"))
   End With
End Sub
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,203
Office Version
  1. 365
Platform
  1. Windows
Glad we could help & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,156
Messages
5,600,027
Members
414,356
Latest member
death20

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