DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim Last_Row As Long, Rng As Range
Dim My_Date As Variant, My_Day As Byte
If Intersect(Target, Range("C3:C4")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Application.EnableEvents = False
Last_Row = Cells(Rows.Count, 3).End(3).Row
Range("H5:AL" & Last_Row).ClearContents
My_Date = DateSerial(Range("C4").Value, Range("A3").Value, 1)
Range("H6").Value = My_Date
My_Day = Day(WorksheetFunction.EoMonth(CLng(My_Date), 0))
Range("H6").AutoFill Destination:=Range("H6").Resize(, My_Day), Type:=xlFillDefault
With Range("H5:AL5")
.Formula = "=IF(H6="""","""",DAY(H6))"
.Value = .Value
End With
With Range("H7:AL7")
.Formula = "=IF(H6="""","""",TEXT(H6,""ggg""))"
.Value = .Value
End With
For Each Rng In Range("H6:AL6")
If Rng.Value <> "" Then
If Weekday(Rng.Value, vbMonday) = 7 Then
Cells(8, Rng.Column).Resize(Last_Row - 7) = "O"
Else
Cells(8, Rng.Column).Resize(Last_Row - 7) = "X"
End If
End If
Next
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub