Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
My project involves copying a row of 5 numbers, transpose to another column, sort the column, then transpose back to the original location, then move to the next row an repeat. I have the following macro I created using the macro recorder. Im not VBA savvy. The macro does the job I need, however, I have 261 rows in my sheet that I need this to perform. I do not know how to get the macro to move to the row, perform the steps and move to the next and so on. Will someone please show me how to adjust my code to finish my project? Thanks in advance. Sub transpose() ' ' transpose Macro ' Copy, transpose, sort, transpose multiple rows ' ' Range("B4:F4").Select NEED TO MOVE TO NEXT ROW AFTER THE MACRO COMPLETES Selection.Copy Range("G3").Select THIS CAN REMAIN STATIC Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False _ , transpose:=True Application.CutCopyMode = False Selection.Sort Key1:=Range("G3"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Selection.Copy Range("B4").Select this needs to adjust to the next cell down as the macro completes a cycle Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False _ , transpose:=True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Recorded Macro | Excel Programming | |||
Recorded Macro | Excel Programming | |||
Creating a macro which presses a button containing a recorded macro | Excel Programming | |||
Recorded macro won't run | Excel Programming |