I have been frustrated trying figure out what I would assume is actually a pretty simple solution. All I am trying to do is grab a set of cells and repeat them down the column a set number of times.
The 2 forms of this are discribed below.
A: I have a set of numbers from A1 to A51 I want to repeate those numbers down the columns 84 times.
B: In addition to this I need to have the cells from B1 to B51 Repeat 84 times but with an increment of 200 each time. So I would have say 1 in B1  B51 and in B52  B102 it would turn into 201 and so on and so forth.
THanks for any and all help. I have tried searching all morning and can't seem to find the solution. This would make the project I am working on blaze by. I will be using this alot so something that I can change the number of times repeated would be great.
Fill Range Down N Cells & Increment By X



Re: Pasting N Times
I did this wich works for repeating the ranges but is there something I could add that would incrimentally increase when pasting? Like I said above add say 200 incrementally for 84 pastes

Re: Pasting N Times
Please try this by pasting in any module. Regards,
Code
Display MoreSub Macro1() Const increment = 200 Const Cycle = 84 counter = 1 j = 1 Do While counter < Cycle Do Sheets("Sheet1").Cells(51 + j, 1) = Sheets("Sheet1").Cells(j, 1) Sheets("Sheet1").Cells(51 + j, 2) = Sheets("Sheet1").Cells(j, 2) + increment j = j + 1 Loop Until j = 51 * counter + 1 counter = counter + 1 Loop End Sub


Re: Fill Range Down N Cells & Increment By X
forum.ozgrid.com/index.php?attachment/29428/Hey thanks for the help. I am having trouble getting it to do what I want I am going to attach my file that I am working with. I have a range of cells 50 cells down that are all the number 7177846 I am trying to get this to copy 84 times and paste incrementally by 200. I put an example of what I am trying to do in column E


Re: Fill Range Down N Cells & Increment By X
I assume that in all 84 cycles you wish to add 200 to every first number of the previous cylce, repeating the new number in the next 50 rows. If so, this code will accomplish that. Regards,
Code
Display MoreSub Macro1() Const Increment = 200 Const Cycle = 84 'You may change the number of repetitions of pasting data Const Datalastrow = 50 'You may change the last row number of your data Counter = 1 j = 1 Do While Counter <= Cycle Do Sheets("Sheet1").Cells(Datalastrow + j, 1) = Sheets("Sheet1").Cells(j, 1) + Increment j = j + 1 Loop Until j = Datalastrow * Counter + 1 Counter = Counter + 1 Loop End Sub
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!