selam
aşagıdaki makroda bir hata varmı acaba bir veri giriyorum ve MsgBox Target.Value & " BU HAFTA 2 DERS SAATLİK LİMİTİNİ DOLDURMUŞTUR" & vbLf & "LÜTFEN BAŞKA HAFTAYA YAZINIZ", vbOKOnly + vbInformation, "E V R E N" yazısı çıkıyor tamama basıyorum ama yinede olmuyor teşekkürler
Private Sub Worksheet_Change(ByVal Target As Range)
Dim adr2 As String
If Intersect(Target, [C5:Q10,C11:Q16,C17:Q22,C23:Q28,C29:Q34]) Is Nothing Then Exit Sub
On Error Resume Next
adr2 = Target.Address
If Target.Row <= 10 Then
adr = Range("C5:Q10").Address
ElseIf Target.Row <= 16 Then
adr = Range("C11:Q16").Address
ElseIf Target.Row <= 22 Then
adr = Range("C17:Q22").Address
ElseIf Target.Row <= 28 Then
adr = Range("C23:Q28").Address
ElseIf Target.Row <= 34 Then
adr = Range("C29:Q34").Address
End If
If WorksheetFunction.CountIf(Sheets("MSL HA").Range(adr), Target.Value) + _
WorksheetFunction.CountIf(Sheets("MSL ME").Range(adr), Target.Value) + _
WorksheetFunction.CountIf(Sheets("MSL Çİ").Range(adr), Target.Value) + _
WorksheetFunction.CountIf(Sheets("MSL NE").Range(adr), Target.Value) + _
WorksheetFunction.CountIf(Sheets("MSL ZE").Range(adr), Target.Value) + _
WorksheetFunction.CountIf(Sheets("MSL BE").Range(adr), Target.Value) + _
WorksheetFunction.CountIf(Sheets("MSL KA").Range(adr), Target.Value) + _
WorksheetFunction.CountIf(Sheets("MSL1").Range(adr), Target.Value) + _
WorksheetFunction.CountIf(Sheets("MSL2").Range(adr), Target.Value) + _
WorksheetFunction.CountIf(Sheets("MSL3").Range(adr), Target.Value) > 2 Then
Target.Select
MsgBox Target.Value & " BU HAFTA 2 DERS SAATLİK LİMİTİNİ DOLDURMUŞTUR" & vbLf & "LÜTFEN BAŞKA HAFTAYA YAZINIZ", vbOKOnly + vbInformation, "E V R E N"
Target.Value = ""
Target.Select
End If
Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub