jnn(z+1,room+1) matrix より、jun(room+1,room+1) に縮小する。
'
Sub column_triple_ally()
flagL = ""
ksum = jun(z + 1, 0)
For i9 = 1 To ksum
For j9 = i9 + 1 To ksum
For k9 = j9 + 1 To ksum
For m = 0 To z + 1
jnn(m, 0) = jun(m, 0)
jnn(m, 1) = jun(m, i9)
jnn(m, 2) = jun(m, j9)
jnn(m, 3) = jun(m, k9)
Next m
ally_room_selection
If flagL <> "" Then Exit Sub
Next k9
Next j9
Next i9
End Sub
'
Sub ally_room_selection()
For i5 = 0 To z + 1
For j5 = 0 To z + 1
' Sheets("Sheet8").Cells(6 + i5, 52 + j5) = jun(i5, j5)
Sheets("Sheet8").Cells(6 + i5, 52 + j5) = jnn(i5, j5)
Next j5
Next i5
For i3 = 1 To z
inum = 0
For j3 = 1 To room
If jnn(i3, j3) <> "" Then
inum = inum + 1
End If
Next j3
jnn(i3, room + 1) = inum
Next i3
knum = 0
For i4 = 1 To z
If jnn(i4, room + 1) <> 0 Then
knum = knum + 1
End If
Next i4
jnn(z + 1, room + 1) = knum
If knum > room Then
Exit Sub
ElseIf knum = room Then
For i5 = 0 To z + 1
For j5 = 0 To room + 1
Sheets("Sheet8").Cells(6 + i5, 63 + room + j5) = jnn(i5, j5)
Next j5
Next i5
column_block_room_division
Else
' MsgBox ("Qurious Case to be noticed !")
Exit Sub
End If
End Sub
0 件のコメント:
コメントを投稿