• Append worksheets data (Excel 2003)

    Author
    Topic
    #454598

    I have a workbook with 105 worksheets, Sheet1, Sheet2, Sheet3,Sheet4 ….. Sheet105. The data is in two Columns : A and B. In column A is the SS# and in Column B is the name
    I need some code to append the data from each worksheet to the existing data in Sheet1starting with Sheet 2 and appending the data from each sheet to the data from the previous sheet on Sheet 1 until all of the data in on Sheet 1. The resulting Sheet 1 will have about 7,000 rows of data in two columns with no labels
    The data on each worksheet starts in Cell A1and there may be an occaisonal blank row in the sheets.

    Viewing 0 reply threads
    Author
    Replies
    • #1128854

      Try this macro:

      Sub AppendData()
      Dim wshS As Worksheet
      Dim wshT As Worksheet
      Dim r As Long
      Dim m As Long
      Dim i As Integer
      Set wshT = Worksheets(“Sheet1”)
      For i = 2 To 105
      Set wshS = Worksheets(“Sheet” & i)
      m = wshS.Range(“A” & wshS.Rows.Count).End(xlUp).Row
      r = wshT.Range(“A” & wshT.Rows.Count).End(xlUp).Row + 1
      wshS.Range(“1:” & m).Copy Destination:=wshT.Range(“A” & r)
      Next i
      End Sub

    Viewing 0 reply threads
    Reply To: Append worksheets data (Excel 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: