Aşağıdaki şekilde dener misiniz?
Kod:
Sub Add_Totals2()
For Each NumRange In Range("j3:j500").SpecialCells(xlCellTypeConstants, 23).Areas
SumAddr = NumRange.Offset(0, 3).Address(False, False)
NumRange.Offset(0, -9).Resize(, 10).Select: kenarlik
NumRange.Offset(0, 1).Resize(, 5).Select: kenarlik2
Range(Replace(Split(NumRange.Offset(0, 3).Address(False, False), ":")(0), "M", "G")) = "=SUM(" & SumAddr & ")"
Next NumRange
End Sub
Sub kenarlik()
With Selection.Borders
.LineStyle = xlContinuous
.Color = -11489280
.TintAndShade = 0
.Weight = xlThick
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
End Sub
Sub kenarlik2()
With Selection.Borders
.LineStyle = xlContinuous
.Color = -16776961
.TintAndShade = 0
.Weight = xlThick
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
End Sub