DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Puantaj()
Dim Sat As Long, _
Sut As Integer, _
Son As Long
Son = Cells(Rows.Count, "B").End(3).Row - 1
If Son < 18 Then Son = 18
Application.ScreenUpdating = False
Range("C18:AG" & Son).ClearContents
For Sat = 18 To Son
Sut = 3
If Not Cells(Sat, "B") = "" Then
Do
If Weekday(Cells(17, Sut), 2) > 5 Then
Cells(Sat, Sut) = "P"
Else
Cells(Sat, Sut) = "X"
End If
Sut = Sut + 1
Loop While Not Cells(17, Sut) = "" [B][COLOR=red]And Sut < 34
[/COLOR][/B] End If
Next Sat
Application.ScreenUpdating = True
MsgBox "İşlem Tamamdır....", vbInformation, "N. YEŞERTENER --> [URL="http://www.excel.web.tr/"]www.excel.web.tr[/URL]"
End Sub
Sayın hocam olmuş ama cetvelde tüm hafta sonlarını "p" olarak belirliyo.Mümkünse ilk satırın cumartesi "x" ,pazar "p",ikinci satır cumartesi "p",pzar "x" şeklinde olabilir mi? devamıda aynı şekilde
Merhaba,
Kod:Sub Puantaj() Dim Sat As Long, _ Sut As Integer, _ Son As Long Son = Cells(Rows.Count, "A").End(3).Row If Son < 18 Then Son = 18 Application.ScreenUpdating = False Range("C18:AG" & Son).ClearContents For Sat = 18 To Son Sut = 3 If Not Cells(Sat, "B") = "" Then Do [COLOR="Red"]If Weekday(Cells(17, Sut), 2) = 7 Then[/COLOR] Cells(Sat, Sut) = "P" Else Cells(Sat, Sut) = "X" End If Sut = Sut + 1 Loop While Not Cells(17, Sut) = "" End If Next Sat Application.ScreenUpdating = True MsgBox "İşlem Tamamdır....", vbInformation, "N. YEŞERTENER --> [URL="http://www.excel.web.tr"]www.excel.web.tr[/URL]" End Sub
Loop While Not Cells(17, Sut) = ""[B][COLOR=red] And Sut < 34[/COLOR][/B]
Sayın Necdet hocam makro konusunda çok acemiyim.Sizler sayesinde birşeyler öğrenmeye çalışıyorum.Haddimi aştım biliyorum.tablodaki verileri b18:ag29 satır aralığında nasıl sınırlandırabiliriz.