Aşağıdaki kodu dener misiniz?
Yapmak istediğinizi doğru anladıysam sanırım oldu, umarım işinize yarar.
İyi çalışmalar.
Dim dolu_sutun, i, d, x, y As Integer
dolu_sutun = WorksheetFunction.CountA(Range("1:1"))
dolu_satir = WorksheetFunction.CountA(Range("A:A"))
For x = 2 To dolu_satir
For y = 5 To dolu_sutun
If WorksheetFunction.Weekday(Cells(1, y), vbMonday) > 5 Then
Cells(x, y).Interior.Color = 11005
End If
Next y
Next x
For d = 2 To dolu_satir Step 5
For i = 5 To dolu_sutun
If WorksheetFunction.Weekday(Cells(1, i), vbMonday) = 1 Then
Cells(d, i).Interior.Color = 65535
Cells(d, i) = "T"
ElseIf WorksheetFunction.Weekday(Cells(1, i), vbMonday) = 2 Then
Cells(d + 1, i).Interior.Color = 65535
Cells(d + 1, i) = "T"
ElseIf WorksheetFunction.Weekday(Cells(1, i), vbMonday) = 3 Then
Cells(d + 2, i).Interior.Color = 65535
Cells(d + 2, i) = "T"
ElseIf WorksheetFunction.Weekday(Cells(1, i), vbMonday) = 4 Then
Cells(d + 3, i).Interior.Color = 65535
Cells(d + 3, i) = "T"
ElseIf WorksheetFunction.Weekday(Cells(1, i), vbMonday) = 5 Then
Cells(d + 4, i).Interior.Color = 65535
Cells(d + 4, i) = "T"
End If
Next i
Next d
MsgBox "GÜNLÜK İZİNLER VE HAFTA SONLARI GÖSTERİLDİ.....!!!!!"
Range("A1").Select