+ Reply to Thread
Results 1 to 6 of 6

Macro to move to next worksheet and repeat task

  1. #1
    Registered User
    Join Date
    12-02-2012
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    6

    Red face Macro to move to next worksheet and repeat task

    Hi
    I am new to Macro and would like some help. Thanks
    I have recorded a macro to pick up data from various cells in a monthly report spreadsheet and return them to my annual spreadsheet.
    The code does work on the first spreadsheet but I have 13 sheets to get the data from.
    I figured there must be a way to have the macro go to the next spreadsheet and pick up the same cells and return them on to the next line.
    So after the code has worked on sheet 1 I need to go to sheet 2 and sheet 3 etc and pick up data from the same cells and enter on the next available row (which would be 401, 402, 403 etc)in my annual spreadsheet
    Any help would be appreciated.

    Thanks very much

    Please Login or Register  to view this content.
    Last edited by wakisme; 12-06-2012 at 10:50 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: New to Macro and would like some help so I can continue learning Thanks

    Quote Originally Posted by davesexcel View Post
    Hello, and welcome to the forum,
    Unfortunately,

    [I]Your post does not comply with Rule..........
    Hi Wakisme,
    I did not see that you had edited the title, thanks.

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,794

    Re: Macro to move to next worksheet and repeat task

    Perhaps something like this

    Please Login or Register  to view this content.
    Alf

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: Macro to move to next worksheet and repeat task

    Hi Wakisme,
    Open the two attached workbooks and run the code from the Wakisme workbook.

    It is a very simple example using just 3 cells on three sheets.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-02-2012
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Macro to move to next worksheet and repeat task

    Hi thanks for your help. I have used Daves advice as it seemed to work better for me this time but I am hoping to be able to use your code help with a different task.

  6. #6
    Registered User
    Join Date
    12-02-2012
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Macro to move to next worksheet and repeat task

    Hi thanks very much for your help. I have this sorted now and I learnt how to do this.

+ 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