DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Yardımlarınızı bekliyorum...
Sub Aktar()
Set s1 = Sheets("Dekont No")
Set s2 = Sheets("Gelen Fatura")
Set s3 = Sheets("Rapor")
For i = 4 To s1.Cells(Rows.Count, 3).End(3).Row
adet = WorksheetFunction.CountIf(s2.Range("D1:D500"), s1.Cells(i, 3).Value)
If adet = 0 Then
sonsat = s3.Cells(Rows.Count, 1).End(3).Row + 1
s3.Cells(sonsat, 1).Value = s1.Cells(i, 2).Value
s3.Cells(sonsat, 3).Value = s1.Cells(i, 3).Value
s3.Cells(sonsat, 4).Value = s1.Cells(i, 4).Value
s3.Cells(sonsat, 7).Value = s1.Cells(i, 5).Value
End If
Next i
For b = 4 To s2.Cells(Rows.Count, 3).End(3).Row
If Len(s2.Cells(b, 4).Value) < 5 Then
sonsat = s3.Cells(Rows.Count, 1).End(3).Row + 1
s3.Cells(sonsat, 1).Value = s2.Cells(b, 2).Value
s3.Cells(sonsat, 2).Value = s2.Cells(b, 3).Value
s3.Cells(sonsat, 3).Value = s2.Cells(b, 4).Value
s3.Cells(sonsat, 4).Value = s2.Cells(b, 5).Value
s3.Cells(sonsat, 5).Value = s2.Cells(b, 6).Value
s3.Cells(sonsat, 6).Value = s2.Cells(b, 7).Value
s3.Cells(sonsat, 7).Value = s2.Cells(b, 8).Value
End If
Next b
End Sub
Yaptım ama sonucunu göremedim