エクセルでサイトマップを作ったけど、罫線を引くのが毎回めんどくさい・・・
このマクロをエクセルVBAに入力して実行すれば、一発で罫線が引けます。

Sub サイトマップ用罫線1()
Dim myRng As Range
Dim c As Range
Dim Flag As String
Set myRng = Selection
Dim i As Long, S As Long, E As Long
S = Selection(1).Column
E = Selection(Selection.Count).Column
For i = Selection(1).Row To Selection(Selection.Count).Row
Range(Cells(i, S), Cells(i, E)).Select
Flag = 0
For Each c In Selection
If Flag = 0 Or c.Value <> "" Then
c.Borders(xlEdgeLeft).LineStyle = xlContinuous
End If
If c.Value <> "" Or Flag = 1 Then
c.Borders(xlEdgeTop).LineStyle = xlContinuous
Flag = 1
End If
Next c
Next i
myRng.Borders(xlEdgeBottom).LineStyle = xlContinuous
myRng.Borders(xlEdgeTop).LineStyle = xlContinuous
myRng.Borders(xlEdgeLeft).LineStyle = xlContinuous
myRng.Borders(xlEdgeRight).LineStyle = xlContinuous
End Sub
①エクセルにサイトマップなどの階層構造のテーブルを作成する
②VBAで標準モジュールにマクロを記入(Alt + F11 → [挿入]→[標準モジュール]→コピペ)
③エクセルに戻って、罫線を引きたい範囲を選択する
④さきほどのマクロを実行(Alt + F8 → 「サイトマップ用罫線1」を実行)
お試しあれ。