Hızlı vlookup

Katılım
7 Haziran 2016
Mesajlar
19
Excel Vers. ve Dili
2013 - eng
Merhaba,

En basit anlamda A kolonunda olan 600.000 lik bir veriyi B kolonundaki 400.000 adetlik veri içinde arama yapacak ve tespit ettiklerini C kolonuna yazdırmak istiyorum. Fakat bu işlem excelde saatler alabiliyor. Bu işlemi VBA ile daha hızlı nasıl yapabilirim.
Yardımlarınız için teşekkürler.
(Forumda benzeri konuda çeşitli sorular var ve çözümleri de yapılmıştır. Ancak hepsi soru içeriğine has özellikler içerdiğinden genelleme yapamadım. )
 

okan32

Altın Üye
Katılım
12 Mayıs 2016
Mesajlar
369
Excel Vers. ve Dili
Ofis 2019- 32 Bit - Türkçe
Altın Üyelik Bitiş Tarihi
16-04-2026
Sub Copy()
Dim ws As Worksheet
Dim lastRow As Long
Dim i As Long
Set ws = ActiveSheet
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
For i = 1 To lastRow
If ws.Cells(i, "A").Value = ws.Cells(i, "B").Value Then
ws.Cells(i, "C").Value = ws.Cells(i, "A").Value
End If
Next i
End Sub
 
Katılım
20 Şubat 2012
Mesajlar
242
Excel Vers. ve Dili
office2007 Türkçe
Deneyin.

Kod:
Sub AraBul()
    Dim cell As Range
    Dim foundCell As Range
    Dim firstAddr As String
 
   
    lRow = Range("A" & Rows.Count).End(xlUp).Row
    Set searchRange = Range("A2:A" & lRow)  ' A daki değerleri
   
    For Each cell In searchRange
   
        Set foundCell = Range("B:B").Find(cell.Value, LookIn:=xlValues) ' B de ara bul
       
        If Not foundCell Is Nothing Then
     
            firstAddr = foundCell.Address
           
            Do
                Set foundCell = Range("B:B").FindNext(foundCell)
                If Not foundCell Is Nothing Then
                    foundCell.Offset(0, 1).Value = foundCell
                    foundCell.Offset(0, 2).Value = "Bulundu"
                End If
            Loop While Not foundCell Is Nothing And foundCell.Address <> firstAddr
           

        End If
    Next cell
End Sub
 
Katılım
7 Haziran 2016
Mesajlar
19
Excel Vers. ve Dili
2013 - eng
Teşekkürler.
 
Üst