Solved

EXCEL 2007

Posted on 2011-09-27
2
253 Views
Last Modified: 2012-06-22
Helllo,
trying to find an easy way to copy and paste cells in excel.
I have 136 cells , under column "A", starting from "A7"
I need to copy "A7" 132 times under column "A", and paste them starting "A150", then copy "A8" 132 times and paste after first paste (starting "A282") and so on..

Any help is appreciated
Thanks.
sample.xlsx
0
Comment
Question by:Wass_QA
2 Comments
 
LVL 7

Accepted Solution

by:
m4trix earned 50 total points
Comment Utility
It doesn't copy and paste (to make it faster) but it accomplishes the same result. The values in this version are fixed, so if your ranges are dynamic this solution will need to be adjusted

Sub fillCells()
    Dim rowA As Integer, copyRow As Integer
    
    copyRow = 150
    For rowA = 7 To 138
        Range("A" & copyRow & ":A" & copyRow + 131) = Range("A" & rowA)
        copyRow = copyRow + 132
    Next rowA
End Sub

Open in new window

0
 

Author Closing Comment

by:Wass_QA
Comment Utility
works like a charm,
thanks
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now