以下、記録。選択中のシート内に横罫を1本引くだけ。

Sub Macro1()
Range("B5").Select

Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
End Sub



このままだと無駄な処理が多いので、削除する。

Sub Macro1()
Range("B5").Select
'--- Selection.Borders(xlDiagonalDown).LineStyle = xlNone
'--- Selection.Borders(xlDiagonalUp).LineStyle = xlNone
'--- Selection.Borders(xlEdgeLeft).LineStyle = xlNone
'--- Selection.Borders(xlEdgeTop).LineStyle = xlNone
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With

'-- Selection.Borders(xlEdgeRight).LineStyle = xlNone
End Sub


いらないので削り、更にシンプルに。

Sub Macro1()

Range("B5").Borders(xlEdgeBottom).Weight = xlThin
End Sub


A1をR1C1にすると

Sub Macro1()
Cells(5, 2).Borders(xlEdgeBottom).Weight = xlThin

End Sub

Range("B5")は1つのセルを選択している。よって、等価の Cells(5,2) に置き換えられる。
B2のセルは、B列、つまり2列目/5行目である。Cellsで表す際は、()内に、行、列の順に記載する。


前回のプログラムと組み合わせて


Sub Macro1()

With Range(Cells(3, 2), Cells(16, 2))
.Borders(xlEdgeLeft).Weight = xlThin
.Borders(xlEdgeRight).Weight = xlThin
End With
Cells(5, 2).Borders(xlEdgeBottom).Weight = xlThin
End Sub

横罫を適当に数行足すと


Sub Macro1()
With Range(Cells(3, 2), Cells(16, 2))
.Borders(xlEdgeLeft).Weight = xlThin
.Borders(xlEdgeRight).Weight = xlThin
End With
Cells(5, 2).Borders(xlEdgeBottom).Weight = xlThin
Cells(8, 2).Borders(xlEdgeBottom).Weight = xlThin
Cells(10, 2).Borders(xlEdgeBottom).Weight = xlThin
Cells(12, 2).Borders(xlEdgeBottom).Weight = xlThin
End Sub

縦横の罫はこれで記述できる。