+ Reply to Thread
Results 1 to 2 of 2

combine data from several worksheets

Hybrid View

Neil444 combine data from several... 05-01-2009, 08:32 PM
windknife Re: combine data from several... 05-02-2009, 02:07 AM
  1. #1
    Registered User
    Join Date
    05-01-2009
    Location
    Chico, California
    MS-Off Ver
    Excel 2003
    Posts
    4

    Question combine data from several worksheets

    I need help. I have converted data from a PDF file into Excel this data converts to several worksheets within the same file. I do not wish to consolidate (overlay) but to place the small worksheets in the same columns. So the end of the first worksheet would be the beginning of the next. Right now I cut and paste, looking for a faster way.

  2. #2
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,897

    Re: combine data from several worksheets

    Using following VBA code

    Sub marco1()
       Dim index As Integer, start As Integer
       Dim rCount As Integer
       
       For index = 2 To ThisWorkbook.Sheets.Count
            start = Sheets(1).Cells.SpecialCells(xlCellTypeLastCell).Row + 1
            With ThisWorkbook.Sheets(index)
                rCount = .Cells.SpecialCells(xlCellTypeLastCell).Row
               .Range(.Cells(1, 1), .Cells(rCount, .Columns.Count)).EntireRow.Copy _
                Destination:=ThisWorkbook.Sheets(1).Range("A" & start)
            End With
       Next index
       
       MsgBox "Succ!"
    End Sub
    Last edited by windknife; 05-02-2009 at 02:10 AM.

+ 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