• DİKKAT

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

satırdaki istediğimiz hücreleri çektirme...

Katılım
22 Kasım 2012
Mesajlar
102
Excel Vers. ve Dili
excel 2007
türkçe
Arkadaşlar benim yapmak istediğim şuan kullandığım makro o koda ait olan bütün satırı getiriyor bana ben ise sadece o kada ait satırdan sadece a,b,c,g,j hücrelerindeki bilgileri getirmek istiyorum koda el atarsanız sevinirim:).
Kod:
 Set s1 = Sheets("1")
    Set s2 = Sheets("2")
    satır = 49
    Application.ScreenUpdating = False
    For Each bul In s1.Range("F2:F" & s1.Range("F65536").End(3).Row)
    If bul.Value = 201305176 Then
    satır = satır + 1
    bul.EntireRow.Copy
    s2.Select
    Cells(satır, 1).PasteSpecial
    End If
    Next bul
    [A1].Select
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
 
Merhaba,

Bu şekilde deneyin.

Kod:
    Set s1 = Sheets("1")
    Set s2 = Sheets("2")
    satır = 49
    Application.ScreenUpdating = False
    For Each bul In s1.Range("F2:F" & s1.Range("F65536").End(3).Row)
    If bul.Value = 201305176 Then
    satır = satır + 1
[COLOR=green]    'bul.EntireRow.Copy[/COLOR]
[COLOR=green]    's2.Select[/COLOR]
[COLOR=green]    'Cells(satır, 1).PasteSpecial[/COLOR]
[COLOR=blue]    s2.Cells(satır, "a") = Cells(bul.Row, "a")[/COLOR]
[COLOR=blue]    s2.Cells(satır, "b") = Cells(bul.Row, "b")[/COLOR]
[COLOR=blue]    s2.Cells(satır, "c") = Cells(bul.Row, "c")[/COLOR]
[COLOR=blue]    s2.Cells(satır, "d") = Cells(bul.Row, "g")[/COLOR]
[COLOR=blue]    s2.Cells(satır, "e") = Cells(bul.Row, "j")[/COLOR]
    End If
    Next bul
    [A1].Select
[COLOR=green]    'Application.CutCopyMode = False[/COLOR]
    Application.ScreenUpdating = True

.
 
Geri
Üst