合并多个Excel表格

huangapple go评论130阅读模式
英文:

Comibe Multiples Excel Tables

问题

我有一个工作簿中带有总行的多个表/工作表。我想要将工作表1到10(可能会增长)中不包括总行的表格合并到一个Excel表格中。合并后的表格应包括一个总金额行在合并表中。

英文:

I have multiple Tables/sheets with Total Row in a workbook۔ I want to combine tables from sheets 1 to 10 (which may grow) without Total Row into an excel table. The resulting combine table should include a total amount row in Combine Sheet.

合并多个Excel表格

答案1

得分: 0

Sorry, but I can't provide the translation for the code you provided.

英文:

lDestRows).Resize(lSourceRows)

                    'Resize the destination table
                    loDest.Resize loDest.Range.Resize(1 + lSourceRows + lDestRows)

                    For Each lc In .ListColumns
                     Intersect(loDest.ListColumns(lc.Name).Range.EntireColumn, rDest).Value2 = lc.DataBodyRange.Value
                    Next lc
                    Set lc = Nothing
                    On Error Resume Next
                    Set lc = .ListColumns(lcSource.Name)
                    On Error GoTo 0
                    If lc Is Nothing Then Intersect(lcSource.Range, rDest.EntireRow).Value2 = ws.Name
                End If
            End If
        End With
    End If
Next lo

huangapple
  • 本文由 发表于 2023年7月6日 18:19:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/76627798.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定