| 
    
     |  | '************************************************************************* '  ("E8:AF8") と ("E23:AF23")
 '*************************************************************************
 Selection.Borders(xlInsideVertical).LineStyle = xlNone
 If count2 = 1 Then
 Range(Cells(8 + 31 * (count1 - 1), "E"), Cells(8 + 31 * (count1 - 1), "AF")).Select
 Else
 Range(Cells(23 + 31 * (count1 - 1), "E"), Cells(23 + 31 * (count1 - 1), "AF")).Select
 End If
 
 Selection.Borders(xlDiagonalDown).LineStyle = xlNone
 Selection.Borders(xlDiagonalUp).LineStyle = xlNone
 With Selection.Borders(xlEdgeLeft)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeTop)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeBottom)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeRight)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 '*************************************************************************
 '  ("E9:AF9") と ("E24:AF24")
 '*************************************************************************
 Selection.Borders(xlInsideVertical).LineStyle = xlNone
 If count2 = 1 Then
 Range(Cells(9 + 31 * (count1 - 1), "E"), Cells(9 + 31 * (count1 - 1), "AF")).Select
 Else
 Range(Cells(24 + 31 * (count1 - 1), "E"), Cells(24 + 31 * (count1 - 1), "AF")).Select
 End If
 
 Selection.Borders(xlDiagonalDown).LineStyle = xlNone
 Selection.Borders(xlDiagonalUp).LineStyle = xlNone
 With Selection.Borders(xlEdgeLeft)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeTop)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeBottom)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeRight)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 '*************************************************************************
 '  ("E10:AF10") と ("E25:AF25")
 '*************************************************************************
 Selection.Borders(xlInsideVertical).LineStyle = xlNone
 ActiveWindow.SmallScroll Down:=3
 If count2 = 1 Then
 Range(Cells(10 + 31 * (count1 - 1), "E"), Cells(10 + 31 * (count1 - 1), "AF")).Select
 Else
 Range(Cells(25 + 31 * (count1 - 1), "E"), Cells(25 + 31 * (count1 - 1), "AF")).Select
 End If
 
 Selection.Borders(xlDiagonalDown).LineStyle = xlNone
 Selection.Borders(xlDiagonalUp).LineStyle = xlNone
 With Selection.Borders(xlEdgeLeft)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeTop)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeBottom)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeRight)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 '*************************************************************************'  ("E11:AF11") と ("E26:AF26")
 '*************************************************************************
 Selection.Borders(xlInsideVertical).LineStyle = xlNone
 If count2 = 1 Then
 Range(Cells(11 + 31 * (count1 - 1), "E"), Cells(11 + 31 * (count1 - 1), "AF")).Select
 Else
 Range(Cells(26 + 31 * (count1 - 1), "E"), Cells(26 + 31 * (count1 - 1), "AF")).Select
 End If
 
 Selection.Borders(xlDiagonalDown).LineStyle = xlNone
 Selection.Borders(xlDiagonalUp).LineStyle = xlNone
 With Selection.Borders(xlEdgeLeft)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeTop)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeBottom)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeRight)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 '*************************************************************************
 '  ("E12:AF12") と ("E27:AF27")
 '*************************************************************************
 Selection.Borders(xlInsideVertical).LineStyle = xlNone
 If count2 = 1 Then
 Range(Cells(12 + 31 * (count1 - 1), "E"), Cells(12 + 31 * (count1 - 1), "AF")).Select
 Else
 Range(Cells(27 + 31 * (count1 - 1), "E"), Cells(27 + 31 * (count1 - 1), "AF")).Select
 End If
 
 Selection.Borders(xlDiagonalDown).LineStyle = xlNone
 Selection.Borders(xlDiagonalUp).LineStyle = xlNone
 With Selection.Borders(xlEdgeLeft)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeTop)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeBottom)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeRight)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 '*************************************************************************
 '  ("E13:AF13") と ("E28:AF28")
 '*************************************************************************
 Selection.Borders(xlInsideVertical).LineStyle = xlNone
 If count2 = 1 Then
 Range(Cells(13 + 31 * (count1 - 1), "E"), Cells(13 + 31 * (count1 - 1), "AF")).Select
 Else
 Range(Cells(28 + 31 * (count1 - 1), "E"), Cells(28 + 31 * (count1 - 1), "AF")).Select
 End If
 
 Selection.Borders(xlDiagonalDown).LineStyle = xlNone
 Selection.Borders(xlDiagonalUp).LineStyle = xlNone
 With Selection.Borders(xlEdgeLeft)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeTop)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeBottom)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeRight)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 '*************************************************************************
 '  ("E14:AF14") と ("E29:AF29")
 '*************************************************************************
 Selection.Borders(xlInsideVertical).LineStyle = xlNone
 If count2 = 1 Then
 Range(Cells(14 + 31 * (count1 - 1), "E"), Cells(14 + 31 * (count1 - 1), "AF")).Select
 Else
 Range(Cells(29 + 31 * (count1 - 1), "E"), Cells(29 + 31 * (count1 - 1), "AF")).Select
 End If
 
 Selection.Borders(xlDiagonalDown).LineStyle = xlNone
 Selection.Borders(xlDiagonalUp).LineStyle = xlNone
 With Selection.Borders(xlEdgeLeft)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeTop)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeBottom)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 With Selection.Borders(xlEdgeRight)
 .LineStyle = xlContinuous
 .Weight = xlThin
 .ColorIndex = xlAutomatic
 End With
 
 |  |