エクセルでサイトマップを作ったけど、罫線を引くのが毎回めんどくさい・・・ このマクロをエクセル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 F
![エクセルでサイトマップなどの階層構造テーブルの罫線を一発で引くマクロ | ツマミグイ。](https://cdn-ak-scissors.b.st-hatena.com/image/square/8871c1deb7f27c07d49822fe097d4b9417f26f2f/height=288;version=1;width=512/http%3A%2F%2Fgrade.upper.jp%2Fwp%2Fwp-content%2Fuploads%2Fscreenshot.64-400x251.jpg)