Sub MarkSequenceInD() Dim ws As Worksheet Dim startRow As Long, endRow As Long Dim currentRow As Long Dim seq As Long Set ws = ActiveSheet startRow = 6 endRow = 35 currentRow = startRow seq = 1 Do While currentRow <= endRow DoEvents If ws.Cells(currentRow, "D").MergeCells Then ' 合并单元格在首单元格标注序号 Dim mergeRng As Range Set mergeRng = ws.Cells(currentRow, "D").MergeArea mergeRng.Cells(1, 1).Value = seq currentRow = mergeRng.Row + mergeRng.Rows.Count seq = seq + 1 Else ' 独立单元格直接标注序号 ws.Cells(currentRow, "D").Value = seq currentRow = currentRow + 1 seq = seq + 1 End If Loop MsgBox "序号标注完成!"End Sub
基本文件流程错误SQL调试
请求信息 : 2026-07-24 03:09:26 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/827980.html