• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

veri alma

Kod:
Sub VeriGetir()
    Dim depoSayfa As Worksheet
    Dim bbSayfa As Worksheet
    Dim depoAralik As Range
    Dim depoSutun As Range
    Dim depoHucresi As Range
    Dim arananVeri As Variant
    Dim bbHucresi As Range

    ' Sayfaları belirle
    Set depoSayfa = Worksheets("DEPO")
    Set bbSayfa = Worksheets("BB")

    ' Depo aralığını belirle (B1:D aralığı)
    Set depoAralik = depoSayfa.Range("B1:D" & depoSayfa.Cells(depoSayfa.Rows.Count, "B").End(xlUp).Row)

    ' BB sayfasındaki K8 hücresinden değeri al
    arananVeri = bbSayfa.Range("K8").Value

    ' Depo aralığında arama yap
    For Each depoSutun In depoAralik.Columns
        Set depoHucresi = depoSutun.Find(arananVeri, LookIn:=xlValues)
        If Not depoHucresi Is Nothing Then
            ' Bulunan hücrenin karşısındaki c15 ve m15 hücrelerini BB sayfasına yaz
            bbSayfa.Range("C15").Value = depoSayfa.Cells(depoHucresi.Row, depoHucresi.Column + 1).Value
            bbSayfa.Range("M15").Value = depoSayfa.Cells(depoHucresi.Row, depoHucresi.Column + 2).Value
            Exit For
        End If
    Next depoSutun
End Sub
Deneyiniz
 

Ekli dosyalar

Teşekkürler ederim yardımlar için üstat
 
Geri
Üst