Sub ki104() Sheets("Sheet2").Select ki1041 End Sub Sub ki104a() Sheets("Sheet2").Select ki1042 End Sub Sub ki104b() Sheets("Sheet1").Select ki1042 End Sub Sub ki104c() Sheets("Sheet1").Select ki1043 Sheets("Sheet2").Select ki1043 End Sub Sub ki1042() '最終セル ActiveCell.SpecialCells(xlLastCell).Select endr = ActiveCell.Row endc = ActiveCell.Column '罫線 Range(Cells(2, 1), Cells(endr, endc)).Select Selection.Borders(xlEdgeLeft).Weight = xlThin Selection.Borders(xlEdgeTop).Weight = xlThin Selection.Borders(xlEdgeBottom).Weight = xlThin Selection.Borders(xlEdgeRight).Weight = xlThin Selection.Borders(xlInsideVertical).Weight = xlThin Selection.Borders(xlInsideHorizontal).Weight = xlThin Range("A2").Select End Sub Sub ki1041() '最終セル ActiveCell.SpecialCells(xlLastCell).Select endr = ActiveCell.Row endc = ActiveCell.Column '罫線 Range(Cells(2, 1), Cells(endr, endc)).Select Selection.Borders(xlEdgeLeft).Weight = xlThin Selection.Borders(xlEdgeTop).Weight = xlThin Selection.Borders(xlEdgeBottom).Weight = xlThin Selection.Borders(xlEdgeRight).Weight = xlThin Selection.Borders(xlInsideVertical).Weight = xlThin If endr <> 2 Then Selection.Borders(xlInsideHorizontal).Weight = xlThin End If Range("A2").Select End Sub Sub ki1043() '最終セル ActiveCell.SpecialCells(xlLastCell).Select endr = ActiveCell.Row endc = ActiveCell.Column '罫線 Range(Cells(2, 1), Cells(endr, endc)).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone Selection.Borders(xlEdgeLeft).LineStyle = xlNone Selection.Borders(xlEdgeTop).LineStyle = xlNone Selection.Borders(xlEdgeBottom).LineStyle = xlNone Selection.Borders(xlEdgeRight).LineStyle = xlNone Selection.Borders(xlInsideVertical).LineStyle = xlNone Selection.Borders(xlInsideHorizontal).LineStyle = xlNone Range("A2").Select End Sub