DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Topla()
Dim j As Integer
Dim i, SonSatır As Long
Dim Tutar As Double
Dim Birim, Sayı As String
Set s1 = Sheets("Sayfa1")
s1.Select
Range("J2:K65000").ClearContents
Application.ScreenUpdating = False
For i = 2 To [A65536].End(3).Row
For j = 1 To 2
Sayı = Cells(i, "A")
If j = 1 Then
Birim = Trim(Cells(i, "B"))
Tutar = Cells(i, "C")
Else
Birim = Trim(Cells(i, "D"))
Tutar = Cells(i, "E")
End If
With Range("I2:I" & [I65536].End(3).Row)
Set c = .Find(Birim, LookIn:=xlValues, LookAt:=xlPart)
If Not c Is Nothing Then
Cells(c.Row, "J") = Cells(c.Row, "J") + Tutar
If Cells(c.Row, "K") = "" Then
Cells(c.Row, "K") = Sayı
Else
Cells(c.Row, "K") = Cells(c.Row, "K") & ", " & Sayı
End If
End If
End With
Next j
Next i
Application.ScreenUpdating = True
MsgBox "İşlem Tamamdır...", vbOKOnly, "[URL="http://www.excel.web.tr/"]www.excel.web.tr[/URL]"
End Sub
Sub Topla()
Dim j As Integer
Dim i, SonSatır As Long
Dim Tutar As Double
Dim Birim, Sayı As String
Set s1 = Sheets("Sayfa1")
s1.Select
Application.ScreenUpdating = False
Range("I2:K65000").ClearContents
[B][COLOR=red]Range("B1:B" & [B65536].End(3).Row).Copy [L1]
Range("D2:D" & [D65536].End(3).Row).Copy Range("L" & [L65536].End(3).Row + 1)
Range("L:L").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("M1"), Unique:=True
Range("M2:M" & [M65536].End(3).Row).Copy [I2]
Columns("L:M").Delete[/COLOR][/B]
For i = 2 To [A65536].End(3).Row
For j = 1 To 2
Sayı = Cells(i, "A")
If j = 1 Then
Birim = Trim(Cells(i, "B"))
Tutar = Cells(i, "C")
Else
Birim = Trim(Cells(i, "D"))
Tutar = Cells(i, "E")
End If
With Range("I2:I" & [I65536].End(3).Row)
Set c = .Find(Birim, LookIn:=xlValues, LookAt:=xlPart)
If Not c Is Nothing Then
Cells(c.Row, "J") = Cells(c.Row, "J") + Tutar
If Cells(c.Row, "K") = "" Then
Cells(c.Row, "K") = Sayı
Else
Cells(c.Row, "K") = Cells(c.Row, "K") & ", " & Sayı
End If
End If
End With
Next j
Next i
Application.ScreenUpdating = True
MsgBox "İşlem Tamamdır...", vbOKOnly, "[URL="http://www.excel.web.tr/"]www.excel.web.tr[/URL]"
End Sub