Архитектура Аудит Военная наука Иностранные языки Медицина Металлургия Метрология
Образование Политология Производство Психология Стандартизация Технологии


Текст программы, связанной с кнопкой «Успеваемость в классах»



 

Private Sub CommandButton4_Click()

If Sheets("справки").Cells(5, 15) = "10а" Then

For I = 3 To 25

A = 0

B = 0

C = 0

For J = 2 To 13

If Sheets("10а").Cells(I, J).Value = 2 Then

   A = A + 1

End If

If Sheets("10а").Cells(I, J).Value = 4 Then

   B = B + 1

End If

If Sheets("10а").Cells(I, J).Value = 5 Then

   C = C + 1

End If

Next J

If A > 0 Then

D = D + 1

End If

If (B + C = 12) And (B > 0) Then

X = X + 1

End If

If C = 12 Then

O = O + 1

End If

Next I

Sheets("справки").Cells(6, 17).Value = D

Sheets("справки").Cells(7, 17).Value = X

Sheets("справки").Cells(8, 17).Value = O

End If

If Sheets("справки").Cells(5, 15) = "10б" Then

D = 0

O = 0

X = 0

For I = 3 To 25

A = 0

B = 0

C = 0

For J = 2 To 13

If Sheets("10б").Cells(I, J).Value = 2 Then

   A = A + 1

End If

   If Sheets("10б").Cells(I, J).Value = 4 Then

   B = B + 1

End If

If Sheets("10б").Cells(I, J).Value = 5 Then

   C = C + 1

End If

Next J

If A > 0 Then

D = D + 1

End If

If (B + C = 12) And (B > 0) Then

X = X + 1

End If

If C = 12 Then

O = O + 1

End If

Next I

Sheets("справки").Cells(6, 17).Value = D

Sheets("справки").Cells(7, 17).Value = X

Sheets("справки").Cells(8, 17).Value = O

End If

If Sheets("справки").Cells(5, 15) = "10в" Then

D = 0

O = 0

X = 0

For I = 3 To 25

A = 0

B = 0

C = 0

For J = 2 To 13

If Sheets("10в").Cells(I, J).Value = 2 Then

   A = A + 1

End If

If Sheets("10в").Cells(I, J).Value = 4 Then

   B = B + 1

End If

If Sheets("10в").Cells(I, J).Value = 5 Then

   C = C + 1

End If

Next J

If A > 0 Then

D = D + 1

End If

If (B + C = 12) And (B > 0) Then

X = X + 1

End If

If C = 12 Then

O = O + 1

End If

Next I

Sheets("справки").Cells(6, 17).Value = D

Sheets("справки").Cells(7, 17).Value = X

Sheets("справки").Cells(8, 17).Value = O

End If

If Sheets("справки").Cells(5, 15) = "10г" Then

D = 0

O = 0

X = 0

For I = 3 To 25

A = 0

B = 0

C = 0

For J = 2 To 13

If Sheets("10г").Cells(I, J).Value = 2 Then

   A = A + 1

End If

If Sheets("10г").Cells(I, J).Value = 4 Then

   B = B + 1

End If

If Sheets("10г").Cells(I, J).Value = 5 Then

   C = C + 1

End If

Next J

If A > 0 Then

D = D + 1

End If

If (B + C = 12) And (B > 0) Then

X = X + 1

End If

If C = 12 Then

O = O + 1

End If

Next I

Sheets("справки").Cells(6, 17).Value = D

Sheets("справки").Cells(7, 17).Value = X

Sheets("справки").Cells(8, 17).Value = O

End If

If Sheets("справки").Cells(5, 15) = "10д" Then

D = 0

O = 0

X = 0

For I = 3 To 25

A = 0

B = 0

C = 0

For J = 2 To 13

If Sheets("10д").Cells(I, J).Value = 2 Then

   A = A + 1

End If

If Sheets("10д").Cells(I, J).Value = 4 Then

   B = B + 1

End If

If Sheets("10д").Cells(I, J).Value = 5 Then

   C = C + 1

End If

Next J

If A > 0 Then

D = D + 1

End If

If (B + C = 12) And (B > 0) Then

X = X + 1

End If

If C = 12 Then

O = O + 1

End If

Next I

Sheets("справки").Cells(6, 17).Value = D

Sheets("справки").Cells(7, 17).Value = X

Sheets("справки").Cells(8, 17).Value = O

End If

If Sheets("справки").Cells(5, 15) = "11а" Then

D = 0

O = 0

X = 0

For I = 3 To 25

A = 0

B = 0

C = 0

For J = 2 To 13

If Sheets("11а").Cells(I, J).Value = 2 Then

   A = A + 1

End If

If Sheets("11а").Cells(I, J).Value = 4 Then

   B = B + 1

End If

If Sheets("11а").Cells(I, J).Value = 5 Then

   C = C + 1

End If

Next J

If A > 0 Then

D = D + 1

End If

If (B + C = 12) And (B > 0) Then

X = X + 1

End If

   If C = 12 Then

O = O + 1

End If

Next I

Sheets("справки").Cells(6, 17).Value = D

Sheets("справки").Cells(7, 17).Value = X

Sheets("справки").Cells(8, 17).Value = O

End If

If Sheets("справки").Cells(5, 15) = "11б" Then

D = 0

O = 0

X = 0

For I = 3 To 25

A = 0

B = 0

C = 0

For J = 2 To 13

If Sheets("11б").Cells(I, J).Value = 2 Then

   A = A + 1

End If

If Sheets("11б").Cells(I, J).Value = 4 Then

   B = B + 1

End If

If Sheets("11б").Cells(I, J).Value = 5 Then

   C = C + 1

End If

Next J

If A > 0 Then

D = D + 1

End If

If (B + C = 12) And (B > 0) Then

X = X + 1

End If

If C = 12 Then

O = O + 1

End If

Next I

Sheets("справки").Cells(6, 17).Value = D

Sheets("справки").Cells(7, 17).Value = X

Sheets("справки").Cells(8, 17).Value = O

End If

If Sheets("справки").Cells(5, 15) = "11в" Then

D = 0

O = 0

X = 0

For I = 3 To 25

A = 0

B = 0

C = 0

For J = 2 To 13

If Sheets("11в").Cells(I, J).Value = 2 Then

   A = A + 1

End If

If Sheets("11в").Cells(I, J).Value = 4 Then

   B = B + 1

End If

If Sheets("11в").Cells(I, J).Value = 5 Then

   C = C + 1

End If

Next J

If A > 0 Then

D = D + 1

End If

If (B + C = 12) And (B > 0) Then

X = X + 1

End If

If C = 12 Then

O = O + 1

End If

Next I

Sheets("справки").Cells(6, 17).Value = D

Sheets("справки").Cells(7, 17).Value = X

Sheets("справки").Cells(8, 17).Value = O

End If

If Sheets("справки").Cells(5, 15) = "11г" Then

D = 0

O = 0

X = 0

For I = 3 To 25

A = 0

B = 0

C = 0

For J = 2 To 13

If Sheets("11г").Cells(I, J).Value = 2 Then

   A = A + 1

End If

If Sheets("11г").Cells(I, J).Value = 4 Then

   B = B + 1

End If

If Sheets("11г").Cells(I, J).Value = 5 Then

   C = C + 1

End If

Next J

If A > 0 Then

D = D + 1

End If

If (B + C = 12) And (B > 0) Then

X = X + 1

End If

If C = 12 Then

O = O + 1

End If

Next I

Sheets("справки").Cells(6, 17).Value = D

Sheets("справки").Cells(7, 17).Value = X

Sheets("справки").Cells(8, 17).Value = O

End If

If Sheets("справки").Cells(5, 15) = "11д" Then

D = 0

O = 0

X = 0

For I = 3 To 25

A = 0

B = 0

C = 0

For J = 2 To 13

If Sheets("11д").Cells(I, J).Value = 2 Then

   A = A + 1

End If

If Sheets("11д").Cells(I, J).Value = 4 Then

   B = B + 1

End If

If Sheets("11д").Cells(I, J).Value = 5 Then

   C = C + 1

End If

Next J

If A > 0 Then

D = D + 1

End If

If (B + C = 12) And (B > 0) Then

X = X + 1

End If

If C = 12 Then

O = O + 1

End If

Next I

Sheets("справки").Cells(6, 17).Value = D

Sheets("справки").Cells(7, 17).Value = X

Sheets("справки").Cells(8, 17).Value = O

End If

End Sub

 


Поделиться:



Последнее изменение этой страницы: 2019-05-08; Просмотров: 172; Нарушение авторского права страницы


lektsia.com 2007 - 2024 год. Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав! (0.033 с.)
Главная | Случайная страница | Обратная связь