vuranoğlu
Altın Üye
- Katılım
- 18 Nisan 2008
- Mesajlar
- 260
- Excel Vers. ve Dili
- excel 2016 tr
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub CommandButton1_Click()
Dim M As Date
Dim i As Long, J As Long
Dim yer1 As String, yillar As String, aylar As String
sat1 = 12 'yazmaya başlıyacağı ilk satır
sut1 = 2 'yazmaya başlıyacağı ilk sutun
sat2 = 73 'yazmaya başlıyacağı son satır
sut2 = "k" 'yazmaya başlıyacağı son sutun
Range(Cells(sat1, sut1), Cells(sat2, sut2)).ClearContents
Range(Cells(sat1, sut1), Cells(sat2, sut2)).Interior.ColorIndex = xlNone
aylar = Range(aylar1).Value
yillar = Range(yillar1).Value
yer1 = Val(Format("01." & Format(aylar, "MM") & "." & Format(yillar, "0000"), "mm"))
Ayin_Son_Gunu = DateSerial(yillar, yer1 + 1, 1) - 1
Ayin_Ilk_Gunu = DateSerial(yillar, yer1, 1)
son = Val(Format(Ayin_Son_Gunu, "dd"))
i = sat1
sut = sut1
For J = 1 To son
If J = 41 Then
sut = sut + 6
i = sat1
End If
M = CDate(Format(J, "00") & "." & Format(aylar, "MM") & "." & Format(yillar, "0000"))
Hicri_takvim1 (M)
Cells(i + J - 1, sut).Value = J
If Format(M, "DDDD") = "Pazar" Or Format(M, "DDDD") = "Cumartesi" Then
Cells(i + J - 1, sut).Interior.ColorIndex = 8
Cells(i + J - 1, sut + 1).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 2).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 3).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 4).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 5).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 6).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 7).Value = Format(M, "DDDD")
Range(Cells(i + J - 1, sut + 7), Cells(i + J, sut + 7)).Interior.ColorIndex = 8
End If
If deg1 <> "" Or deg2 <> "" Then
Cells(i + J - 1, sut).Interior.ColorIndex = 8
Cells(i + J - 1, sut + 1).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 2).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 3).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 4).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 5).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 6).Interior.ColorIndex = 19
Cells(i + J - 1, sut + 7).Value = "Bayram"
Range(Cells(i + J - 1, sut + 7), Cells(i + J, sut + 7)).Interior.ColorIndex = 8
End If
i = i + 1
Next
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [I5, J5]) Is Nothing Then Exit Sub
Call hesapla
End Sub
Cells(i + J - 1, "J") = Cells(i + J - 1, "F") - Cells(i + J - 1, "C")
If Format(M, "DDDD") = "Pazar" Or Format(M, "DDDD") = "Cumartesi" Then