+ Reply to Thread
Results 1 to 2 of 2

Moving old info in a macro

Hybrid View

  1. #1
    Registered User
    Join Date
    07-02-2008
    Location
    England
    Posts
    2

    Moving old info in a macro

    Im attempting to record a macro which copies sales from one sheet onto an inventory list on the next sheet. At the start of the macro I need all the previous sales to move down one box leaving room for the new sale. Or even a macro to make sure it copies at the bottom of the list everytime, either way would be good. But whenever I try to do it with CTRL+SHIFT+ARROW DOWN+ARROW RIGHT which selects all the previous sales then maybe cut and paste or nudge down a cell, it always fails to run properly. Is there some sort of trick to doing this?

  2. #2
    Registered User
    Join Date
    03-08-2007
    Posts
    93

    Moving data with a macro

    I have my arrow controllers set differently, so I cant be sure, but I suspect that when even though you're selecting the data using the arrows, the macro is recording the actual cell references, not the keystrokes. In order for the macro to do the "end over, end down" thing, you need to adjust the code after it has been recorded. If your data block starts in cell "A1" and you want to select the entire contiguous block, use:

        Range("A1").Select
        Range(Selection.End(xlToRight), Selection.End(xlDown)).Select
    Hope this helps

    SAE

+ Reply to Thread

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