- Katılım
- 8 Mart 2009
- Mesajlar
- 504
- Excel Vers. ve Dili
- 2010
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Rapor_Al()
Dim dizi(), syf As Worksheet, Wf As WorksheetFunction
Dim i As Long, j As Byte
Set Wf = WorksheetFunction
Application.ScreenUpdating = False
Sheets("NETİCE").Select
Range("C3:J" & Rows.Count).ClearContents
dizi = Array("", "geçen yıl", "giriş", "çıkış")
For i = 3 To Cells(Rows.Count, "A").End(xlUp).Row
For j = 1 To 3
Set syf = Sheets(dizi(j))
With syf
If j = 1 Then
Cells(i, "C") = Wf.SumIf(.[G:G], Cells(i, "A"), .[J:J])
Cells(i, "D") = Wf.SumIf(.[G:G], Cells(i, "A"), .[L:L])
ElseIf j = 2 Then
Cells(i, "E") = Wf.SumIf(.[G:G], Cells(i, "A"), .[J:J])
Cells(i, "F") = Wf.SumIf(.[G:G], Cells(i, "A"), .[L:L])
ElseIf j = 3 Then
Cells(i, "G") = Wf.SumIf(.[G:G], Cells(i, "A"), .[J:J])
Cells(i, "H") = Wf.SumIf(.[G:G], Cells(i, "A"), .[L:L])
End If
End With
Next j
Cells(i, "I") = Cells(i, "C") + Cells(i, "E") - Cells(i, "G")
Cells(i, "J") = Cells(i, "D") + Cells(i, "F") - Cells(i, "H")
Next i
Application.ScreenUpdating = True
End Sub
Sub Rapor_Al()
Dim dizi(), syf As Worksheet, Wf As WorksheetFunction
Dim i As Long, j As Byte, deg As String
Set Wf = WorksheetFunction
Application.ScreenUpdating = False
Sheets("NETİCE").Select
Range("C3:K" & Rows.Count).ClearContents
dizi = Array("", "geçen yıl", "giriş", "çıkış")
For i = 3 To Cells(Rows.Count, "A").End(xlUp).Row
For j = 1 To 3
Set syf = Sheets(dizi(j))
With syf
If j = 1 Then
Cells(i, "C") = Wf.SumIf(.[G:G], Cells(i, "A"), .[J:J])
Cells(i, "D") = Wf.SumIf(.[G:G], Cells(i, "A"), .[L:L])
If Wf.CountIf(.[G:G], Cells(i, "A")) > 0 _
Then deg = "Var" Else deg = "Yok"
Cells(i, "K") = "1.Sayfafa " & deg
ElseIf j = 2 Then
Cells(i, "E") = Wf.SumIf(.[G:G], Cells(i, "A"), .[J:J])
Cells(i, "F") = Wf.SumIf(.[G:G], Cells(i, "A"), .[L:L])
If Wf.CountIf(.[G:G], Cells(i, "A")) > 0 _
Then deg = "Var" Else deg = "Yok"
Cells(i, "K") = Cells(i, "K") & " 2.Sayfafa " & deg
ElseIf j = 3 Then
Cells(i, "G") = Wf.SumIf(.[G:G], Cells(i, "A"), .[J:J])
Cells(i, "H") = Wf.SumIf(.[G:G], Cells(i, "A"), .[L:L])
If Wf.CountIf(.[G:G], Cells(i, "A")) > 0 _
Then deg = "Var" Else deg = "Yok"
Cells(i, "K") = Cells(i, "K") & " 3.Sayfafa " & deg
End If
End With
Next j
Cells(i, "I") = Cells(i, "C") + Cells(i, "E") - Cells(i, "G")
Cells(i, "J") = Cells(i, "D") + Cells(i, "F") - Cells(i, "H")
Next i
Application.ScreenUpdating = True
End Sub