DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
[FONT="Trebuchet MS"]Sub aktar()
tarih = Val(Format(Now, "mm"))
ay = Application.InputBox("İlgili Ayı sayı olarak giriniz.", "Başlangıç Ay", tarih, 400, 30, , Type:=1)
If ay = False Then
MsgBox "İşlemi iptal ettiniz"
Exit Sub
End If
If ay <= 0 Then
MsgBox " ay sıfırdan den büyük sayı giriniz"
Exit Sub
End If
If ay > 12 Then
MsgBox "ay 12 den küçük sayı giriniz."
Exit Sub
End If
ay = ay + 5
For i = 2 To Worksheets("veri").Cells(Rows.Count, "D").End(3).Row
If Sheets("veri").Cells(i, 5).Value > 0 Then
If Sheets("veri").Cells(i, 20).Value > 0 Then Sheets("veri").Cells(i, 21).Value = Sheets("veri").Cells(i, 20).Value
Sheets("veri").Cells(i, 19).Value = Sheets("veri").Cells(i, 18).Value
Sheets("veri").Cells(i, ay).Value = Sheets("veri").Cells(i, ay).Value + Sheets("veri").Cells(i, 5).Value
Sheets("veri").Cells(i, 18).Value = WorksheetFunction.Sum(Worksheets("veri").Range("F" & i & ":Q" & i))
If Sheets("veri").Cells(i, 18).Value > 7 Then Sheets("veri").Cells(i, 20).Value = Sheets("veri").Cells(i, 18).Value - 7
Sheets("veri").Cells(i, 22).Value = Sheets("veri").Cells(i, 20).Value - Sheets("veri").Cells(i, 21).Value
If Sheets("veri").Cells(i, 22).Value = 0 Then Sheets("veri").Cells(i, 22).Value = ""
Else
If Sheets("veri").Cells(i, 20).Value > 0 Then
Sheets("veri").Cells(i, 21).Value = Sheets("veri").Cells(i, 20).Value
Sheets("veri").Cells(i, 20).Value = ""
Sheets("veri").Cells(i, 22).Value = ""
End If
End If
Sheets("veri").Cells(i, 5).Value = ""
Next
MsgBox "işlem tamam"
End Sub[/FONT]