Курсовая работа: Успеваемость студентов

Dim ChartObj As ChartObject

j = 2

Index = 0

For i = 0 To 3

Stat(i) = 0

Next i

If Autumn.Value = True Then Index = 0 Else Index = 1

ActiveWorkbook.Worksheets.Add After:=Worksheets(Worksheets.Count)

With ActiveSheet

.Cells.Clear

Do

Value = Worksheets("Storage").Cells(j, 1).Value

If Len(Value) > 0 Then

If Worksheets("Storage").Cells(j, 1).Value = Group.Value Then

If Split(Worksheets("Storage").Cells(j, Object.ListIndex + 5).Value, ":")(Index) = "5" Then Stat(0) = Stat(0) + 1

If Split(Worksheets("Storage").Cells(j, Object.ListIndex + 5).Value, ":")(Index) = "4" Then Stat(1) = Stat(1) + 1

If Split(Worksheets("Storage").Cells(j, Object.ListIndex + 5).Value, ":")(Index) = "3" Then Stat(2) = Stat(2) + 1

If Split(Worksheets("Storage").Cells(j, Object.ListIndex + 5).Value, ":")(Index) = "2" Then Stat(3) = Stat(3) + 1

End If

End If

j = j + 1

Loop Until Len(Value) = 0

.Cells(1, 1).Value = "Диаграмма успеваемости группы " + Group.Value

.Cells(2, 1).Value = "по предмету " + Object.Value

.Cells(3, 1).Value = "за " + Str(Index + 1) + "-й семестр"

For i = 0 To 3

.Cells(i + 4, 1).Value = "Оценка " + Str(5 - i)

.Cells(i + 4, 2).Value = Str(Stat(i))

Next i

К-во Просмотров: 2006
Бесплатно скачать Курсовая работа: Успеваемость студентов