Excel macro to merge multiple sheets: 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.

20 November 2024

  • curprev 16:3416:34, 20 November 2024Mwroot talk contribs 966 bytes +966 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" ' 开始..."