DEAR SIR
資料量大用VBA應比較快
如下會將 A欄自動依有資料之列數秀出B欄+C欄
然後 D欄自動秀出有重覆之儲存格內容LIST(可依需求改為其他東東秀出)
Sub AA()
X = Sheet1.[B65536].End(xlUp).Row
For A = 1 To X
Sheet1.Cells(A, 1) = Sheet1.Cells(A, 2) & Sheet1.Cells(A, 3)
Next
On Error Resume Next
Dim Myarr()
For Each A In Range([A1], [A65536].End(xlUp))
If WorksheetFunction.CountIf(Range([A1], [A65536].End(xlUp)), A) > 1 Then
If WorksheetFunction.Match(A, Myarr, 0) = 0 Then
ReDim Preserve Myarr(i)
Set Myarr(i) = A
i = i + 1
End If
End If
Next
[D2].Resize(i, 1) = WorksheetFunction.Transpose(Myarr)
End Sub作者: samwang 時間: 2014-12-31 08:22