tristanfermat
Altın Üye
- Katılım
- 12 Haziran 2018
- Mesajlar
- 98
- Excel Vers. ve Dili
- Excel 365
- Altın Üyelik Bitiş Tarihi
- 15-08-2026
Merhaba
Asagidaki kodu sayfa1 haric diger sayfalarda calistirmak istiyorum. Herhangi bir sayfaya ekleyip calistirdigimda degerler sayfa1'ede geliyor nasil engelleyebilirim?
Tesekkürler
Asagidaki kodu sayfa1 haric diger sayfalarda calistirmak istiyorum. Herhangi bir sayfaya ekleyip calistirdigimda degerler sayfa1'ede geliyor nasil engelleyebilirim?
Tesekkürler
Kod:
Sub Toplamlar()
Dim i As Long, _
t(3) As Double
For i = 2 To Cells(Rows.Count, "A").End(3).Row
If Cells(i, "C") = Date Then t(0) = t(0) + Cells(i, "B")
If (Year(Cells(i, "C")) = Year(Date)) And _
Application.WorksheetFunction.WeekNum(Cells(i, "C")) = Application.WorksheetFunction.WeekNum(Date) Then _
t(1) = t(1) + Cells(i, "B")
If (Year(Cells(i, "C")) = Year(Date)) And _
Month(Cells(i, "C")) = Month(Date) Then _
t(2) = t(2) + Cells(i, "B")
If (Year(Cells(i, "C")) = Year(Date)) Then t(3) = t(3) + Cells(i, "B")
Next i
Range("F3").Resize(4, 1) = Application.WorksheetFunction.Transpose(t)
Call calistir
End Sub
Sub calistir()
Application.OnTime Now + TimeValue("00:00:03"), "Toplamlar"
End Sub