Private Sub CommandButton1_Click()
Call sum(54)
Call sum(61)
Call sum(68)
Call sum(77)
Call sum(86)
Call sum(92)
'MsgBox "end"
End Sub
Sub sum(intBeineLine_param As Integer)
'MsgBox "sum begin"
Dim coutnBeginColumn As Integer '8 ソェハシホサヨテ
Dim countKind1 As Double '078A
Dim countKind2 As Double '083A
Dim strCompareKind1 As String
Dim strCompareKind2 As String
'------------------------------------------------078A----------------------------------------------------
countKind1 = 0
strCompareKind1 = Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 1, 52).Value
'MsgBox strCompareKind1
coutnBeginColumn = 8
Do While coutnBeginColumn < 51
If Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param, coutnBeginColumn).Value = strCompareKind1 Then
countKind1 = countKind1 + Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 1, coutnBeginColumn).Value
End If
coutnBeginColumn = coutnBeginColumn + 1
Loop
Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 1, 53).Value = countKind1
'------------------------------------------------083A----------------------------------------------------
countKind2 = 0
strCompareKind2 = Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 2, 52).Value
coutnBeginColumn = 8
Do While coutnBeginColumn < 51
If Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param, coutnBeginColumn).Value = strCompareKind2 Then
countKind2 = countKind2 + Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 1, coutnBeginColumn).Value
End If
coutnBeginColumn = coutnBeginColumn + 1
Loop
Worksheets("ノ峵bモ興ュ").Cells(intBeineLine_param + 2, 53).Value = countKind2
End Sub