Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Help with Looping Macros
Hi i am currently in the process of trying to transpose my data from one sheet to another within the same workbook.
Here's is the VBA script of the macro: Sub Transpose() ' ' Transpose Macro ' Macro recorded 12/24/2010 by Chaitanya Rane ' ' Range("D2:D24").Select Selection.Copy Sheets("Sheet1").Select Range("B3").Select Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _ xlNone, SkipBlanks:=False, Transpose:=True Sheets("Sheet2").Select Range("E2:E24").Select Application.CutCopyMode = False Selection.Copy Sheets("Sheet1").Select Range("Z3").Select Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _ xlNone, SkipBlanks:=False, Transpose:=True End Sub __________________________________________________ ______________ What i need this macro to do now is loop and keep pasting the data from sheet two except that the selection range [ Range("D2:D24").Select & Range("E2:E24").Select] has to add 23 to it so that will be [Range("D25:D47").Select&Range("E25:E47").Select] so and so forth till the last value is D&E8396 respectively. In essence i know what i want the function to do but cant get the syntax. Also is there any other way than using a macro. Please help!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Looping Macros that change | Excel Discussion (Misc queries) | |||
Looping | Excel Discussion (Misc queries) | |||
Not Looping | Excel Discussion (Misc queries) | |||
Looping | Excel Discussion (Misc queries) | |||
Looping macros using VB code | Excel Discussion (Misc queries) |