Excelで内側の線と太枠の線を一度に書くマクロ
選択範囲の外側を太線、内側を普通線にするマクロ。対象のセルを範囲選択してある前提です。
Sub 太枠の表() '選択範囲の罫線を '内側:細線、外枠:中太線(まとめデータでよく使う形式)にする Application.ScreenUpdating = False With Selection With .Borders(xlEdgeLeft) .Weight = xlMedium End With With .Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With .Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With .Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With .Borders(xlInsideVertical) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With .Borders(xlInsideHorizontal) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With End With Application.ScreenUpdating = True End Sub