Created
February 10, 2018 05:13
-
-
Save DuongAQ/1e312b3a5a81f0f35b3287598641c8da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Loc_Khong_Trung_02() | |
Dim ar As Variant | |
Dim var() | |
Dim i As Long | |
Dim n As Long | |
ar = Range("A1").CurrentRegion 'Vị trí bắt đầu trong bảng dữ liệu | |
ReDim var(1 To UBound(ar, 1), 1 To 1) | |
With CreateObject("scripting.dictionary") | |
.comparemode = 1 | |
For i = 1 To UBound(ar, 1) | |
.Item(ar(i, 2)) = Empty | |
Next | |
For i = 1 To UBound(ar, 1) | |
If Not .exists(ar(i, 1)) Then | |
n = n + 1 | |
var(n, 1) = ar(i, 1) | |
End If | |
Next | |
End With | |
[E1].Resize(n).Value = var 'Vị trí trích xuất kết quả so sánh | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment