Public Sub 顺序合并内容相同单元()
Dim CXrng As Range, Rng As Range, i As Long
Set Rng = Sheets("sheet2").Range("A1")
For Each CXrng In Sheets("Sheet1").Range("A1:A" & Sheets("Sheet1").Range("A65536").End(xlUp).Row)
If CXrng.Value <> Rng.Value Then
If i <> 0 Then Rng.Resize(i, 1).Merge
Set Rng = Sheets("sheet2").Range("A" & CXrng.Row)
Rng.Value = CXrng.Value
i = 1
Else
i = i + 1
End If
Next
If i <> 0 Then Rng.Resize(i, 1).Merge
End Sub