DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub iki_sutun_karsilastir()
Dim sh As Worksheet, ssa As Long, ssb As Long, alana As Range, _
alanb As Range, b(), hcr As Range, z As Object
Set sh = Sheets("Sayfa1")
ssa = sh.Range("A56789").End(3).Row
ssb = sh.Range("B56789").End(3).Row
Set alana = sh.Range("A2:A" & ssa)
Set alanb = sh.Range("B2:B" & ssb)
Set z = CreateObject("scripting.dictionary")
z.comparemode = vbTextCompare
ReDim b(0)
n = 0
For Each hcr In alana
If Not z.exists(hcr.Value) And hcr.Value <> "" Then
If Application.WorksheetFunction.CountIf(alanb, hcr.Value) > 0 Then
z.Add hcr.Value, n
ReDim Preserve b(n)
b(n) = hcr.Value
n = n + 1
End If
End If
Next hcr
sh.Range("D2").Resize(n).Value = Application.Transpose(b)
MsgBox "İşlem tamamlandı", vbInformation, "antonio"
End Sub
=EĞERHATA(İNDİS($B$1:$B$500;KÜÇÜK(EĞER(EĞERSAY($A$2:$A$500;$B$2:$B$500)>0;SATIR($A$2:$A$500));SATIR(A1));SATIR($A$1));"")