录一个宏就可以了。
Sub Macro1()
Dim myRng As Range
Set myRng = [a4:c100]
With myRng.Font
.Name = "Arial"
.Size = 12
End With
myRng.Borders(xlDiagonalDown).LineStyle = xlNone
myRng.Borders(xlDiagonalUp).LineStyle = xlNone
With myRng.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With myRng.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With myRng.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With myRng.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
myRng.Borders(xlInsideVertical).LineStyle = xlNone
myRng.Borders(xlInsideHorizontal).LineStyle = xlNone
End Sub
追问如果每句能注釋一下就更好了
参考资料:神龛培训;NICHE TRAINING