Sub ShtAdd()
'根据班级新建不同的工作表
Dim i As Integer, sht As Worksheet
Dim j As Integer
Dim have As Boolean
i = 2 '第一条记录的行号为2
Set sht = Worksheets("成绩表")
Do While sht.Cells(i, "C") <> ""
have = False
For j = 1 To Worksheets.Count
If Worksheets(j).Name = sht.Cells(i, "C").Value Then
have = True
Exit For
End If
Next j
If have = False Then
Worksheets.Add after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = sht.Cells(i, "C").Value
End If
i = i + 1
Loop
End Sub
成绩处理 根据班级对成绩分类 之根据班级新建工作表
最新推荐文章于 2022-07-13 22:44:34 发布