宏合并多个工作表: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

29 September 2025

  • curprev 09:5009:50, 29 September 2025Mwroot talk contribs 997 bytes +997 Created page with "通义千问 prompt: <pre> 合并 sheet1 sheet2 ... sheetN 的内容至 sheetNEW 请用宏处理 </pre> <syntaxhighlight lang="VBScript" line> Sub 合并多个工作表到SheetNEW() Dim ws As Worksheet Dim newWs As Worksheet Dim lastRow As Long Dim sourceWsName As String ' 创建新的工作表作为目标表 Set newWs = ThisWorkbook.Sheets.Add(After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)) newWs.Name = "SheetNEW" ' 开始..."