DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 5 Then Exit Sub
Target.ClearFormats
If Target.Value > 0 Then
Target.Select
With Selection.Borders(xlDiagonalDown)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlDiagonalUp)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
Else
End If
End Sub
Option Explicit
Sub ÇARPI_VURGUSU()
Dim X As Byte, Alan As Range, Hücre As Range
Application.ScreenUpdating = False
Set Alan = Range("E4:E" & Cells(Rows.Count, 3).End(3).Row)
For X = 1 To 8
Alan.Borders(X).LineStyle = xlNone
Next
For Each Hücre In Alan
If Hücre.Value > 0 Then
Hücre.Borders(xlDiagonalDown).LineStyle = 1
Hücre.Borders(xlDiagonalUp).LineStyle = 1
End If
Next
Application.ScreenUpdating = True
MsgBox "İşleminiz tamamlanmıştır.", vbInformation
End Sub
peki hocam bu makroyu tek butonla 10 ayrı sayfada işlev gördürebilir miyim?Merhaba,
Alternatif olarak aşağıdaki koduda kullanabilirsiniz.
Kod:Option Explicit Sub ÇARPI_VURGUSU() Dim X As Byte, Alan As Range, Hücre As Range Application.ScreenUpdating = False Set Alan = Range("E4:E" & Cells(Rows.Count, 3).End(3).Row) For X = 1 To 8 Alan.Borders(X).LineStyle = xlNone Next For Each Hücre In Alan If Hücre.Value > 0 Then Hücre.Borders(xlDiagonalDown).LineStyle = 1 Hücre.Borders(xlDiagonalUp).LineStyle = 1 End If Next Application.ScreenUpdating = True MsgBox "İşleminiz tamamlanmıştır.", vbInformation End Sub