+ Reply to Thread
Results 1 to 2 of 2

Copying data from multiple sheets into one sheet

  1. #1
    Todd
    Guest

    Copying data from multiple sheets into one sheet

    Hi,

    I'm trying to write a macro. Currently it asks the user how many sheets the
    user has e.g. 5 and opens the 5 sheets.
    What i need to be able to do is copy the data from these sheets into one
    sheet then output it into another workbook.
    So if the first sheet has 6 rows, then those rows will start at (A1)
    if the next one has 2 rows it should start at the 7th row



  2. #2
    Norman Jones
    Guest

    Re: Copying data from multiple sheets into one sheet

    Hi Todd,

    See Ron De Bruin's copy routines at:

    http://www.rondebruin.nl/copy2.htm#UsedRange

    See particularly Ron's Test3 macro.

    This will create a summary sheet named 'Master'. To copy the summary sheet
    to a new workbook, you could add the following lines to Ron's macro

    DestSh.Copy
    ActiveWorkbook.SaveAs "SummaryBook" & ".xls"

    Insert these lines immediately before the existing line:

    Application.ScreenUpdating = True

    Change "SummaryBook" to a name appropriate to your needs.

    If this code is to be placed other than in the workbook to be summarised,
    change each instance of

    "ThisWorkbook" to ActiveWorkbook

    and ensure that the workbook to be summarised is the active workbbook before
    running the code.

    ---
    Regards,
    Norman



    "Todd" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I'm trying to write a macro. Currently it asks the user how many sheets
    > the
    > user has e.g. 5 and opens the 5 sheets.
    > What i need to be able to do is copy the data from these sheets into one
    > sheet then output it into another workbook.
    > So if the first sheet has 6 rows, then those rows will start at (A1)
    > if the next one has 2 rows it should start at the 7th row
    >
    >




+ 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