- Katılım
- 14 Kasım 2021
- Mesajlar
- 42
- Excel Vers. ve Dili
- Excell 2010 Türkçe
Merhaba aşağıda bulunan koda ekleme yapabilirmiyim ilk 5 satırda çalışmaması için sağdan sola soldan sağa seçebiliyorum istediğim aralığı en üst 5 satır problem oluyor varmıdır bir kodu
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Application.ScreenUpdating = False
If Application.CutCopyMode = xlCopy Then Exit Sub
If Application.CutCopyMode = xlCut Then Exit Sub
Cells.FormatConditions.Delete
Range("A87") = 1
With Range("B" & Target.Row).Resize(1, 19)
.FormatConditions.Add xlExpression, , "=$A$87=1"
.FormatConditions(1).Borders.LineStyle = 0
.FormatConditions(1).Interior.ColorIndex = 8
.FormatConditions(1).Font.Bold = True
.FormatConditions(1).Font.Colorlndex = 5
End With
Range("A:S").FormatConditions.Add xlExpression, , "=$A1<>"""""
Range("A:s").FormatConditions(2).Borders.LineSty1e = 0
Application.ScreenUpdating = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Application.ScreenUpdating = False
If Application.CutCopyMode = xlCopy Then Exit Sub
If Application.CutCopyMode = xlCut Then Exit Sub
Cells.FormatConditions.Delete
Range("A87") = 1
With Range("B" & Target.Row).Resize(1, 19)
.FormatConditions.Add xlExpression, , "=$A$87=1"
.FormatConditions(1).Borders.LineStyle = 0
.FormatConditions(1).Interior.ColorIndex = 8
.FormatConditions(1).Font.Bold = True
.FormatConditions(1).Font.Colorlndex = 5
End With
Range("A:S").FormatConditions.Add xlExpression, , "=$A1<>"""""
Range("A:s").FormatConditions(2).Borders.LineSty1e = 0
Application.ScreenUpdating = True
End Sub