• DİKKAT

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

Makro ile iki veriye göre sorgulama

Katılım
17 Ağustos 2006
Mesajlar
106
Kod:
Sub OdenmeyenleriListele()
 
Dim sat As Long, sayfa As Worksheet, c As Range, IlkAdres As String
Application.ScreenUpdating = False
Sheets("Ödemeyenler").Select
Range("A4:e65536").ClearContents
sat = 4
For Each sayfa In Worksheets
    If sayfa.Name <> "Ödemeyenler" And sayfa.Name <> "Veri" And _
    sayfa.Name <> "Rezervasyon" Then
        With sayfa.Range("I:I")
            Set c = .Find("Ödenmedi", , LookIn:=xlValues)
             If Not c Is Nothing Then
                IlkAdres = c.Address
                Do
                    Cells(sat, "A") = sat - 3
                    Cells(sat, "B") = sayfa.Cells(c.Row, "E")
                    Cells(sat, "C") = sayfa.Cells(c.Row, "C")
                    Cells(sat, "D") = sayfa.Cells(c.Row, "j")
                    Cells(sat, "e") = sayfa.Cells(c.Row, "m")
                    sat = sat + 1
 
                    Set c = .FindNext(c)
                Loop While Not c Is Nothing And c.Address <> IlkAdres
            End If
        End With
    End If
Next sayfa
Application.ScreenUpdating = True
MsgBox "isleminiz Tamamlanmistir ORTiM TURiZM!", vbInformation
End Sub

Arkadaşlar üstteki makroda değeri sadece "Ödendi" olan verileri başka alabiliyorum. Bu seçeneğe "Ödendi"'nin yanında "Kısmi Ödeme" diye bir seçenek de ekleyebilir miyim?
Ödendi ve Kısmi Ödeme değerini içeren verileri alabilir miyim?
 
Deneyiniz.:cool:
Kod:
Set c = .Find("Ödenmedi", , LookIn:=xlValues)
             If Not c Is Nothing Then
                IlkAdres = c.Address
                Do
                    Cells(sat, "A") = sat - 3
                    Cells(sat, "B") = sayfa.Cells(c.Row, "E")
                    Cells(sat, "C") = sayfa.Cells(c.Row, "C")
                    Cells(sat, "D") = sayfa.Cells(c.Row, "j")
                    Cells(sat, "e") = sayfa.Cells(c.Row, "m")
                    sat = sat + 1
 
                    Set c = .FindNext(c)
                Loop While Not c Is Nothing And c.Address <> IlkAdres
             end if
set c= nothing
Set c = .Find("Kısmi Ödeme", , LookIn:=xlValues)
             If Not c Is Nothing Then
                IlkAdres = c.Address
                Do
                    Cells(sat, "A") = sat - 3
                    Cells(sat, "B") = sayfa.Cells(c.Row, "E")
                    Cells(sat, "C") = sayfa.Cells(c.Row, "C")
                    Cells(sat, "D") = sayfa.Cells(c.Row, "j")
                    Cells(sat, "e") = sayfa.Cells(c.Row, "m")
                    sat = sat + 1
 
                    Set c = .FindNext(c)
                Loop While Not c Is Nothing And c.Address <> IlkAdres
           end if
set c = nothing
 
Geri
Üst