第2个回答 2021-03-14
拿去,运行这个宏代码
Sub aa()
Dim i, k, x
For i = 2 To Range("a65536").End(xlUp).Row
x = WorksheetFunction.CountIf(Range(Cells(1, 1), Cells(i, 1)), Cells(i, 1))
If x = 1 Then
y = WorksheetFunction.CountIf(Range("a:a"), Cells(i, 1))
Z = WorksheetFunction.CountA(Range("l2:cz2"))
Range(Cells(i, 1), Cells(y + i - 1, "j")).Select
Range(Cells(i, 1), Cells(y + i - 1, "j")).Copy Cells(2, Z + 12)
End If
Next
End Sub本回答被提问者采纳