DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
=B3-EĞER(EHATALIYSA(DÜŞEYARA(I3;$E$3:$G$8;2;0));0;DÜŞEYARA(I3;$E$3:$G$8;2;0))
=B3-IF(ISERROR(VLOOKUP(I3;$E$3:$G$8;2;0));0;VLOOKUP(I3;$E$3:$G$8;2;0))
=C3-EĞER(EHATALIYSA(DÜŞEYARA(I3;$E$3:$G$8;3;0));0;DÜŞEYARA(I3;$E$3:$G$8;3;0))
=C3-IF(ISERROR(VLOOKUP(I3;$E$3:$G$8;3;0));0;VLOOKUP(I3;$E$3:$G$8;3;0))
Sub Duzenle()
Dim i, Son As Long
Application.ScreenUpdating = False
Sheets("Sayfa1").Select
Columns("N").Clear
Range("I3:K" & [I65536].End(3).Row + 1).ClearContents
Range("A2:A" & [A65536].End(3).Row).Copy Range("N1")
Range("E3:E" & [E65536].End(3).Row).Copy Range("N" & [N65536].End(3).Row + 1)
Range("N1:N" & [N65536].End(3).Row).AdvancedFilter xlFilterCopy, , [I2], True
Columns("N").Clear
Son = [A65536].End(3).Row
For i = 3 To [I65536].End(3).Row
Set Bul = Range("A3:A" & Son).Find(Cells(i, "I"), LookIn:=xlValues)
If Not Bul Is Nothing Then
Cells(i, "J") = Cells(Bul.Row, "B")
Cells(i, "K") = Cells(Bul.Row, "C")
Else
Cells(i, "J") = 0
Cells(i, "K") = 0
End If
Next i
Son = [E65536].End(3).Row
For i = 3 To [I65536].End(3).Row
Set Bul = Range("E3:E" & Son).Find(Cells(i, "I"), LookIn:=xlValues)
If Not Bul Is Nothing Then
Cells(i, "J") = Cells(i, "J") - Cells(Bul.Row, "F")
Cells(i, "K") = Cells(i, "K") - Cells(Bul.Row, "G")
End If
Next i
Application.ScreenUpdating = True
End Sub
Merhaba,
Sorunuzu fonksiyonlarla çözmek beni aşar. Makrolu çözüm isterseniz aşağıdaki kodları deneyiniz.
Kod:Sub Duzenle() Dim i, Son As Long Application.ScreenUpdating = False Sheets("Sayfa1").Select Columns("N").Clear Range("I3:K" & [I65536].End(3).Row + 1).ClearContents Range("A2:A" & [A65536].End(3).Row).Copy Range("N1") Range("E3:E" & [E65536].End(3).Row).Copy Range("N" & [N65536].End(3).Row + 1) Range("N1:N" & [N65536].End(3).Row).AdvancedFilter xlFilterCopy, , [I2], True Columns("N").Clear Son = [A65536].End(3).Row For i = 3 To [I65536].End(3).Row Set Bul = Range("A3:A" & Son).Find(Cells(i, "I"), LookIn:=xlValues) If Not Bul Is Nothing Then Cells(i, "J") = Cells(Bul.Row, "B") Cells(i, "K") = Cells(Bul.Row, "C") Else Cells(i, "J") = 0 Cells(i, "K") = 0 End If Next i Son = [E65536].End(3).Row For i = 3 To [I65536].End(3).Row Set Bul = Range("E3:E" & Son).Find(Cells(i, "I"), LookIn:=xlValues) If Not Bul Is Nothing Then Cells(i, "J") = Cells(i, "J") - Cells(Bul.Row, "F") Cells(i, "K") = Cells(i, "K") - Cells(Bul.Row, "G") End If Next i Application.ScreenUpdating = True End Sub