Execel重複項目刪除和數據合併,VBA怎麼用呢?
回答 (2)
Cx = [A1048576].End(3).Row
For i = 2 To Cx
Rnga = Cells(i, 1)
If Rnga = "" Then Exit Sub
For j = Cx To i + 1 Step -1
Rngb = Cells(j, 1)
If Rnga = Rngb Then
For k = 2 To [AA1].End(xlToLeft).Column
Cells(i, k) = Cells(i, k) + Cells(j, k)
Next
Rows(j).Delete Shift:=xlUp
End If
Next
Next
收錄日期: 2021-05-03 07:15:13
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20180705051146AAKmPWz
檢視 Wayback Machine 備份