30
s400 = S400 + s40
s500 = S500 + S50
s10 = 0
s20 = 0
s30 = 0
s40 = 0
S50 = 0
Next i
k = K + 1
Worksheets ("Лист2"). Cells (k, 2). Value = "Разом по ліцею "
Worksheets ("Лист2"). Cells (k, 3). Value = Str (s100) & "/" & Str (s200)
Worksheets ("Лист2"). Cells (k, 4). Value = Str (s500)
Worksheets ("Лист2"). Cells (k, 5). Value = Str (Round (100 * (s100 - s500)/s100)) & "%"
Worksheets ("Лист2"). Cells (k, 6). Value = Str (s300) & "(" & Str (s400) & ")"
Worksheets ("Лист2"). Cells (k, 7). Value = Str (Round (100 * s300/s100)) & "%"
Worksheets ("Лист2"). Cells (k + 3, 2). Value = "Директор економічного ліцею"
Worksheets ("Лист2"). Cells (k + 3, 7). Value = "Н.І.Кузенко"
k = 2
Worksheets ("Ліст4"). Cells (k, 2). Value = "Разом по ліцею "
Worksheets ("Лист2"). Cells (k, 3). Value = Str (s100) & "/" & Str (s200)
Worksheets ("Лист2"). Cells (k, 4). Value = Str (s500)
Worksheets ("Лист2"). Cells (k, 5). Value = Str (Round (100 * (s200 - s500)/s100)) & "%"
Worksheets ("Лист2"). Cells (k, 6). Value = Str (s300) & "(" & Str (s400) & ")"
Worksheets ("Лист2"). Cells (k, 7). Value = Str (Round (100 * s300/s100)) & "%"
End Sub
Макрос В«НевстигаючіВ»
Private Sub CommandButton1_Click ()
Dim s As String
For i = 1 To 4
For j = 8 To 150
Worksheets ("Ліст3"). Cells (j, i). Value = ""
Next j
Next i
k = 1
j = 8
For i = 5 To 76
S1 = Worksheets ("Лист1"). Cells (i, 4). Value
s2 = Worksheets ("Лист1"). Cells (i, 5). Value
s = Worksheets ("Лист1"). Cells (i, 1). Value
If S1 <> "" Then S1 = S1 + ";"
t = 1
While t <= Len (s2)
If Mid (s2, t, 1) <> ":" Then
S1 = S1 + Mid (s2, t, 1)
Else
S1 = S1 + Mid (s2, t, 1) + "н/а "p> End If
t = T + 1
Wend
If Len (S1) <> 0 Then
If Mid (S1, Len (S1), 1) <> ";" Then
S1 = S1 + ";"
End If
End If
While InStr (S1, ":")> 0
q = Mid (S1, 1, InStr (S1, ":") - 1)
S1 = Mid (S1, InStr (S1, ":") + 1, Len (S1))
n = Mid (S1, 1, InStr (S1, ";") - 1)
S1 = Mid (S1, InStr (S1, ";") + 1, Len (S1))
If InStr (S1, q)> 0 Then
n = N + ";" + Mid (Mid (Mid (S1, InStr (S1, q) - 1, Len (S1)), InStr (Mid (S1, InStr (S1, q) - 1, Len (S1)), ":") + 1, Len (S1)), 1, InStr (Mid (Mid (S1, InStr (S1, q) - 1, Len (S1)), InStr (Mid (S1, InStr (S1, q) - 1, Len (S1)), ":") + 1, Len (S1)), ";") - 1)
S1 = Mid (S1, 1, InStr (S1, q) - 1) + Mid (Mid (S1, InStr (S1, q), Len (S1)), InStr (Mid (S1, InStr (S1, q), Len (S1)), ";") + 1, Len (S1))
Worksheets ("Ліст3"). Cells (j, 1). Value = k
Worksheets ("Ліст3"). Cells (j, 2). Value = q
Worksheets ("Ліст3"). Cells (j, 3). Value = s
Worksheets ("Ліст3"). Cells (j, 4). Value = n
Else
Worksheets ("Ліст3"). Cells (j, 1). Value = k
Worksheets ("Ліст3"). Cells (j, 2). Value = q
Worksheets ("Ліст3"). Cells (j, 3). Value = s
Worksheets ("Ліст3"). Cells (j, 4). Value = n
End If
k = K + 1
j = J + 1
Wend
Next i
Worksheets ("Ліст3"). Cells (j + 2, 2). Value = "Разом:"
Worksheets ("Ліст3"). Cells (j + 2, 3). Value = Str (k - 1) + "чол." p> Worksheets ("Ліст3"). Cells (j + 4, 2). Value = "Директор "p> Worksheets ("Ліст3"). Cells (j + 5, 2). Value = "економічного ліцею"
Worksheets ("Ліст3"). Cells (j + 5, 4). Value = "Н.І.Кузенко"
End Sub
Макрос В«ПропускиВ»
Private Sub CommandButton1_Click ()
Dim s As String
For i = 3 To 150
For j = 1 To 5
Worksheets ("Ліст4"). Cells (i, j). Value = ""
Next j
Next i
k = 3
For nk = 1 To 11
For i = 5 To 76
s = Worksheets ("Лист1"). Cells (i, 1). Value
If Len (s) <> 0 Then
If Len (s)> 1 Then r = 2 Else r = 1
If Val (Left (s, r)) = nk Then
Worksheets ("Ліст4"). Cells (k, 1). Value = Worksheets ("Лист1"). Cells (i, 1). Value
Worksheets ("Ліст4"). Cells (k, 2). Value = Worksheets ("Лист1"). Cells (i, 11). Value
S1 = S1 + Val (Worksheets ("Лист1"). Cells (i, 11). Value)
Worksheets ("Ліст4"). Cells (k, 3). Value = Worksheets ("Лист1"). Cells (i, 12). Value
s2 = S2 + Val (Worksheets ("Лист1"). Cells (i, 12). Value)
Worksheets ("Ліст4"). Cells (k, 4). Value = Worksheets ("Лист1"). Cells (i, 13). Value
S3 = S3 + Val (Worksheets ("Лист1"). Cells (i, 13). Value)
Worksheets ("Ліст4"). Cells (k, 5). Value = Worksheets ("Лист1"). Cells (i, 14). Value
s4 = S4 + Val (Worksheets ("Лист1"). Cell...