Solved

Excel 2007

Posted on 2011-09-27
4
262 Views
Last Modified: 2012-05-12
Hello,
I'm trying to copy Column "D", FROM "D7" TO "D138" and paste them into Column "C" Starting "C150", Then Copy Column "E" startin g "E7" TO "E138" into Column "C" after the first paste ("C282") and so on.

Your help is appreciated.
Thanks,
sample.xlsx
0
Comment
Question by:Wass_QA
  • 3
4 Comments
 
LVL 8

Expert Comment

by:wchh
ID: 36714714
Try macro code below
0
 
LVL 8

Expert Comment

by:wchh
ID: 36714718

Sub fillCells()
    Dim copyRow As Integer
    Set Rng = ActiveSheet.Range("D7:EE7")
    copyRow = 150
    For i = 4 To 138
        ActiveSheet.Columns(i).Rows("7:138").Copy ActiveSheet.Range("C" & copyRow)
        copyRow = copyRow + 132
    Next i
End Sub

Open in new window

0
 
LVL 8

Accepted Solution

by:
wchh earned 50 total points
ID: 36714724
ignore previous code...
Sub fillCells()
    Dim copyRow As Integer
        copyRow = 150
    For i = 4 To 138
        ActiveSheet.Columns(i).Rows("7:138").Copy ActiveSheet.Range("C" & copyRow)
        copyRow = copyRow + 132
    Next i
End Sub

Open in new window

0
 

Author Closing Comment

by:Wass_QA
ID: 36715886
Aawsome, thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

757 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

20 Experts available now in Live!

Get 1:1 Help Now