98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » How do I create a procedure to copy a range with two rows and tw
How do I create a procedure to copy a range with two rows and tw
Resolved · Medium Priority · Version 2010
Yandisa has attended:
Excel VBA Introduction course
How do I create a procedure to copy a range with two rows and tw
How do I create a procedure to repeatedly copy a range with two rows and twenty columns and past as values a few rows below, until the 100 iterations or the differences between the rows is zero? And thereafter
RE: How do I create a procedure to copy a range with two rows an
Hi Yandisa
Thanks for your question.
I have refereed it onto a trainer that has experience with automating the Solver in Excel. Could you please say a little more about any formulas that are in the range of data?
Thanks
Doug
STL
RE: How do I create a procedure to copy a range with two rows an
Hi Yandisa,
Thank you for the forum question.
I am not sure I understand what you want. If you look at the code below:
Sub CopyDown()
Dim iCounter As Integer
Dim RangeArray As Variant 'an array to store the data
RangeArray = Range("a1:t2") 'the range where you have data
For iCounter = 1 To 400 Step 4 'step 4 controls the counter in the loop.
Range("A" & iCounter + 3).Resize(2, 20) = RangeArray
Next iCounter
End Sub
This will "copy" a1:T2 and "paste" as value 100 times with 2 rows between each range.
I am confused about this part "or the differences between the rows is zero? And thereafter"
I hope this can help you in the right direction.
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
Fri 3 Feb 2017: Automatically marked as resolved.
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Copying Values Without Formulas in Excel 2010If you want to copy the contents of a cell but don't want to copy the formula with it then use the following simple method: |