Results 1 to 25 of 25

Make recorded macro loop

Threaded View

  1. #1
    Registered User
    Join Date
    06-22-2005
    Posts
    19

    Make recorded macro loop

    I have recorded the below macro but I need it to loop until there is nothing left in the last column.

    Can anyone assist?

    Thanks,

    Sub ARS2013test()
    '
    ' ARS2013test Macro
    '
    ' Keyboard Shortcut: Ctrl+t
    '
        ActiveCell.Offset(0, 1).Range("A1").Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.Cut
        ActiveCell.Offset(0, -3).Range("A1").Select
        Selection.End(xlDown).Select
        ActiveCell.Offset(1, 0).Range("A1").Select
        ActiveSheet.Paste
        Selection.End(xlUp).Select
        ActiveCell.Offset(-1, 0).Range("A1").Select
        Selection.End(xlToRight).Select
        Selection.Copy
        ActiveCell.Offset(1, -2).Range("A1").Select
        Selection.End(xlDown).Select
        ActiveCell.Offset(1, 0).Range("A1:A31").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Selection.End(xlUp).Select
        ActiveCell.Offset(0, 2).Columns("A:A").EntireColumn.Select
        Application.CutCopyMode = False
        Selection.Delete Shift:=xlToLeft
        ActiveCell.Offset(1, -1).Range("A1").Select
    End Sub
    Moderator's Edit: Use code tags when posting code. To do so in future, select the code and click on the # icon at the top of your post window.
    Last edited by arlu1201; 01-04-2013 at 02:45 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1