Siparişlerimden bakiye kalan ürünleri bulmak

YUSUF44

Destek Ekibi
Destek Ekibi
Katılım
4 Ocak 2006
Mesajlar
12,073
Excel Vers. ve Dili
İş : Ofis 365 - Türkçe
Ev: Ofis 365 - Türkçe
Aşağıdaki makroyu deneyiniz:

PHP:
Sub gelmeyenler()
eski = WorksheetFunction.Max(Cells(Rows.Count, "L").End(3).Row, 4)
sonA = WorksheetFunction.Max(Cells(Rows.Count, "A").End(3).Row, 3)
sonF = WorksheetFunction.Max(Cells(Rows.Count, "F").End(3).Row, 3)
Range("L4:O" & eski).ClearContents
For i = 3 To sonA
    If WorksheetFunction.SumIfs(Range("B3:B" & sonA), Range("A3:A" & sonA), Cells(i, "A"), _
        Range("D3:D" & sonA), Cells(i, "D")) > WorksheetFunction.SumIfs(Range("G3:G" & sonF), _
        Range("F3:F" & sonF), Cells(i, "A"), Range("I3:I" & sonF), Cells(i, "D")) Then
            yeni = Cells(Rows.Count, "L").End(3).Row + 1
            Cells(yeni, "L") = Cells(i, "A")
            Cells(yeni, "M") = WorksheetFunction.SumIfs(Range("B3:B" & sonA), Range("A3:A" & sonA), Cells(i, "A"), _
                Range("D3:D" & sonA), Cells(i, "D")) - WorksheetFunction.SumIfs(Range("G3:G" & sonF), _
                Range("F3:F" & sonF), Cells(i, "A"), Range("I3:I" & sonF), Cells(i, "D"))
            Cells(yeni, "N") = Cells(i, "C")
            Cells(yeni, "O") = Cells(i, "D")
    End If
Next
End Sub
 
Katılım
21 Ocak 2009
Mesajlar
18
Excel Vers. ve Dili
english
Aşağıdaki makroyu deneyiniz:

PHP:
Sub gelmeyenler()
eski = WorksheetFunction.Max(Cells(Rows.Count, "L").End(3).Row, 4)
sonA = WorksheetFunction.Max(Cells(Rows.Count, "A").End(3).Row, 3)
sonF = WorksheetFunction.Max(Cells(Rows.Count, "F").End(3).Row, 3)
Range("L4:O" & eski).ClearContents
For i = 3 To sonA
    If WorksheetFunction.SumIfs(Range("B3:B" & sonA), Range("A3:A" & sonA), Cells(i, "A"), _
        Range("D3:D" & sonA), Cells(i, "D")) > WorksheetFunction.SumIfs(Range("G3:G" & sonF), _
        Range("F3:F" & sonF), Cells(i, "A"), Range("I3:I" & sonF), Cells(i, "D")) Then
            yeni = Cells(Rows.Count, "L").End(3).Row + 1
            Cells(yeni, "L") = Cells(i, "A")
            Cells(yeni, "M") = WorksheetFunction.SumIfs(Range("B3:B" & sonA), Range("A3:A" & sonA), Cells(i, "A"), _
                Range("D3:D" & sonA), Cells(i, "D")) - WorksheetFunction.SumIfs(Range("G3:G" & sonF), _
                Range("F3:F" & sonF), Cells(i, "A"), Range("I3:I" & sonF), Cells(i, "D"))
            Cells(yeni, "N") = Cells(i, "C")
            Cells(yeni, "O") = Cells(i, "D")
    End If
Next
End Sub
Çok teşekkür ederim, makroyu kaydettim ve çalıştırdım. sağolun
 
Üst