DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub toplamlarterarsiz59()
Dim list(), i, z, ilk As Date, son As Date, iade
Application.ScreenUpdating = False
Set z = CreateObject("Scripting.dictionary")
With Sheets("DATA")
.Range("J7:K" & Rows.Count).ClearContents
ilk = .Range("Q7").Value
son = .Range("Q9").Value
list = .Range("B2:H" & .Cells(Rows.Count, "B").End(xlUp).Row).Value
For i = 1 To UBound(list)
If list(i, 1) >= ilk And list(i, 1) <= son Then
If list(i, 6) = "" Then
miktar = 1
Else
miktar = list(i, 6)
End If
If UCase(Replace(Replace(list(i, 3), "i", "İ"), "ı", "I")) = "İADE" Then
iade = -1
Else
iade = 1
End If
If Not z.exists(list(i, 7)) Then
z.Add list(i, 7), list(i, 4) * miktar * iade
Else
z.Item(list(i, 7)) = z.Item(list(i, 7)) + (list(i, 4) * miktar * iade)
End If
End If
Next i
If z.Count > 0 Then
.Range("J7").Resize(z.Count, 2) = Application.Transpose(Array(z.items, z.keys))
Application.ScreenUpdating = True
MsgBox "İşlem Tamamlandı." & vbLf & "evrengizlen@hotmail.com", _
vbOKOnly + vbInformation, Application.UserName
End If
End With
End Sub
En hızlısını yaptım.
Dosyanız ektedir.![]()
=TOPLA(($B$2:$B$60000>=$Q$7)*($B$2:$B$60000<=$Q$9)*($H$2:$H$60000=K7)*(($G$2:
$G$60000="")+$G$2:$G$60000)*($E$2:$E$60000*(($D$2:$D$60000="Satış")*2-1)))
Sub toplamlarterarsiz59()
Dim list(), i, z, [COLOR=blue]a, b,[/COLOR] ilk As Date, son As Date
Application.ScreenUpdating = False
Set z = CreateObject("Scripting.dictionary")
With Sheets("DATA")
.Range("J7:K" & Rows.Count).ClearContents
ilk = .Range("Q7").Value
son = .Range("Q9").Value
list = .Range("B2:H" & .Cells(Rows.Count, "B").End(xlUp).Row).Value
For i = 1 To UBound(list)
If list(i, 1) >= ilk And list(i, 1) <= son Then
[COLOR=blue] a = list(i, 4): b = list(i, 6)[/COLOR]
[COLOR=blue] If list(i, 3) = "İade" Then a = -list(i, 4)[/COLOR]
[COLOR=blue] If list(i, 6) = "" Then b = 1[/COLOR]
If Not z.exists(list(i, 7)) Then
z.Add list(i, 7), [COLOR=blue]a [/COLOR]* [COLOR=blue]b[/COLOR]
Else
z.Item(list(i, 7)) = z.Item(list(i, 7)) + ([COLOR=blue]a[/COLOR] * [COLOR=blue]b[/COLOR])
End If
End If
Next i
If z.Count > 0 Then
.Range("J7").Resize(z.Count, 2) = Application.Transpose(Array(z.items, z.keys))
Application.ScreenUpdating = True
MsgBox "İşlem Tamamlandı." & vbLf & "[EMAIL="evrengizlen@hotmail.com"]evrengizlen@hotmail.com[/EMAIL]", _
vbOKOnly + vbInformation, Application.UserName
End If
End With
End Sub
Doayayı güncelledim.2 nolu mesajdan indirebi.lirsiniz.Sayın Orion1, ilginize teşekkürler. İadeleri negatif olarak, miktar kısmı boş olanları ise 1 olarak dikkate almalı. Çözüm hakikaten çok hızlı. Ufak bir revizyon ile mükemmel olacak. Çok teşekkürler.