burhancavus61
Altın Üye
- Katılım
- 13 Mayıs 2005
- Mesajlar
- 761
- Excel Vers. ve Dili
- 2010 Türkçe
- Altın Üyelik Bitiş Tarihi
- 03.11.2024
Teşekkür ederim 61 yazıyorum ve oldu. Çok sağolun
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
hangisini?Bunu sadece K ve L sütunları içinde yapabilirmiyim başka sayfada kullanacağım.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Unprotect "123"
On Error GoTo 10
With Range("C3:G150,J3:L150")
.Interior.ColorIndex = xlNone
.Locked = True
.FormulaHidden = True
End With
If Intersect(Target, Range("C3:C150,D3:D150,E3:E150,F3:F150,G3:G150,J3:L150")) Is Nothing Then GoTo 10
If Selection.Cells.Count <> 1 Then: ActiveCell.Select
For Each j In Range("C3:L150")
If j.Column <> 8 And j.Column <> 9 Then
If Selection.Cells.Count = 1 Then ActiveCell.Interior.Color = 65535
If j.Value = "" And WorksheetFunction.CountA(Range("C" & Target.Row & ":G" & Target.Row, "J" & Target.Row & ":L" & Target.Row)) < 8 Then
If ActiveCell <> "" And j <> ActiveCell Then GoTo 10
If j = "" Then
j.Select
j.Locked = False
j.FormulaHidden = False
: GoTo 10
End If
End If: End If: Next
10:
ActiveSheet.Protect "123"
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Unprotect "123"
On Error GoTo 10
sonsat = 150
With Range("K1:L" & sonsat)
.Interior.ColorIndex = xlNone
.Locked = True
.FormulaHidden = True
End With
If Intersect(Target, Range("K1:L" & sonsat)) Is Nothing Then GoTo 10
If Selection.Cells.Count <> 1 Then: ActiveCell.Select
For Each j In Range("K1:L" & sonsat)
If Selection.Cells.Count = 1 Then ActiveCell.Interior.Color = 65535
If j.Value = "" And WorksheetFunction.CountA(Range("K" & Target.Row & ":L" & Target.Row)) < 2 Then
If ActiveCell <> "" And j <> ActiveCell Then GoTo 10
If j = "" Then
j.Select
j.Locked = False
j.FormulaHidden = False
: GoTo 10
End If
End If: Next
10:
ActiveSheet.Protect "123"
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Unprotect "61" '<-----------------------'
On Error GoTo 10
Range("C3:G150,J3:J150").Interior.ColorIndex = xlNone
If Intersect(Target, Range("C3:C150,D3:D150,E3:E150,F3:F150,G3:G150,J3:J150")) Is Nothing Then GoTo 10
If Selection.Cells.Count <> 1 Then: ActiveCell.Select
For Each j In Range("C3:J150")
If j.Column <> 8 And j.Column <> 9 Then
If Selection.Cells.Count = 1 Then ActiveCell.Interior.Color = 65535
If j.Value = "" And WorksheetFunction.CountA(Range("C" & Target.row & ":G" & Target.row, "J" & Target.row)) < 6 Then
If ActiveCell <> "" And j <> ActiveCell Then GoTo 10
If j = "" Then j.Select: GoTo 10
End If: End If: Next
10:
ActiveSheet.Protect "61", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Unprotect "61" '<-----------------------'
On Error GoTo 10
Range("C3:G150,J3:K150").Interior.ColorIndex = xlNone
If Intersect(Target, Range("C3:G150,J3:K150")) Is Nothing Then GoTo 10
If Selection.Cells.Count <> 1 Then: ActiveCell.Select
For Each j In Range("C3:K150")
If j.Column <> 8 And j.Column <> 9 Then
If Selection.Cells.Count = 1 Then ActiveCell.Interior.Color = 65535
If j.Value = "" And WorksheetFunction.CountA(Range("C" & Target.Row & ":G" & Target.Row, "J" & Target.Row & ":K" & Target.Row)) < 7 Then
If ActiveCell <> "" And j <> ActiveCell Then GoTo 10
If j = "" Then j.Select: GoTo 10
End If: End If: Next
10:
ActiveSheet.Protect "61", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Unprotect "123"
On Error GoTo 10
sonsat = 150 'SON SATIR; GEREKTİĞİNE GÖRE ARTIRILIR
With Range("K1:L150")
.Interior.ColorIndex = xlNone
'.Locked = True 'KORUMALI SAYFADA HÜCREYE VERİ GİREBİLMEK İÇİN HÜCRE KİLİDİNİ AÇAR////////
'.FormulaHidden = True
End With
If Intersect(Target, Range("K1:L" & sonsat)) Is Nothing Then GoTo 10 '<---------"K1" İLK SATIR İSTEĞE GÖRE AYARLANIR/////////
If Selection.Cells.Count <> 1 Then: ActiveCell.Select
For Each j In Range("K1:L" & sonsat) '<---------"K1" İLK SATIR İSTEĞE GÖRE AYARLANIR//////////
If Selection.Cells.Count = 1 Then ActiveCell.Interior.Color = 65535
If j.Value = "" And WorksheetFunction.CountA(Range("K" & Target.Row & ":L" & Target.Row)) < 2 Then
If ActiveCell <> "" And j <> ActiveCell Then GoTo 10
If j = "" Then
j.Select
'j.Locked = False ' HÜCREYİ KİLİTLER////////
: GoTo 10
End If
End If: Next
10:
ActiveSheet.Protect "123"
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Unprotect "61" '<-----------------------'
On Error GoTo 10
Range("C3:G150,J3:K150").Interior.ColorIndex = xlNone
If Intersect(Target, Range("C3:G150,J3:K150")) Is Nothing Then GoTo 10
If Selection.Cells.Count <> 1 Then: ActiveCell.Select
For Each j In Range("C3:K150")
If j.Column <> 8 And j.Column <> 9 Then
If Selection.Cells.Count = 1 Then ActiveCell.Interior.Color = 65535
If j.Value = "" And WorksheetFunction.CountA(Range("C" & Target.row & ":G" & Target.row, "J" & Target.row & ":K" & Target.row)) < 7 Then
If ActiveCell <> "" And j <> ActiveCell Then GoTo 10
If j = "" Then j.Select: GoTo 10
End If: End If: Next
10:
ActiveSheet.Protect "61", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Unprotect "61" '<-----------------------'
On Error GoTo 10
Range("C3:G150,J3:K150").Interior.ColorIndex = xlNone
If Not Intersect(Target, Range("C3:G150,J3:K150")) Is Nothing Then
If Selection.Cells.Count <> 1 Then: ActiveCell.Select
For Each j In Range("C3:K150")
If j.Column <> 8 And j.Column <> 9 Then
If Selection.Cells.Count = 1 Then ActiveCell.Interior.Color = 65535
If j.Value = "" And WorksheetFunction.CountA(Range("C" & Target.Row & ":G" & Target.Row, "J" & Target.Row & ":K" & Target.Row)) < 7 Then
If ActiveCell <> "" And j <> ActiveCell Then GoTo 10
If j = "" Then j.Select: GoTo 10
End If: End If: Next
Else
Cells(Cells(Rows.Count, "C").End(3).Row + 1, "C").Select
End If
10:
'ActiveSheet.Protect "61", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
End Sub