Курсовая работа: Информационно-аналитическая система Казанского вокзала
Loop
i = 1
Do
i = i + 1
If Sheets(3).Cells(i, 1) = "" Then
r = i - 1
Exit Do
End If
Loop
For z = 2 To j
For x = 2 To r
If Sheets(3).Cells(x, 1).Text = Sheets(1).Cells(z, 1).Text And _
Sheets(3).Cells(x, 3).Text = Sheets(1).Cells(z, 2).Text Then
If Sheets(3).Cells(x, 4).Text = "A" Then
a = a + 1
ElseIf Sheets(3).Cells(x, 4).Text = "B" Then
b = b + 1
ElseIf Sheets(3).Cells(x, 4).Text = "C" Then
c = c + 1
Else
d = d + 1
End If
End If
Next x
For t = 2 To l
If Sheets(2).Cells(t, 1).Text = Sheets(1).Cells(z, 1).Text Then
y = a * Sheets(2).Cells(t, 2).Value + b * Sheets(2).Cells(t, 3).Value + _
c * Sheets(2).Cells(t, 4).Value + d * Sheets(2).Cells(t, 5).Value
End If