エクセルでサイトマップを作ったけど、罫線を引くのが毎回めんどくさい・・・ このマクロをエクセル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 Fla