|
- Sub 评价()
- arr = Sheets("学生成绩").UsedRange
- ar_bz = Sheets("评价标准").UsedRange
- ar_nj = Sheets("年级").UsedRange
- Set d = CreateObject("scripting.dictionary")
-
- For i = 1 To UBound(ar_nj)
- d(ar_nj(i, 2)) = ar_nj(i, 1)
- Next i
-
- For i = 2 To UBound(ar_bz)
- d(ar_bz(i, 1)) = ar_bz(i, 2)
- Next i
-
- For i = 2 To UBound(arr)
- For j = 5 To 24
- s = arr(1, j) & d(arr(i, 1)) & arr(i, j)
- arr(i, j) = arr(1, j) & ":" & arr(i, j) & d(s)
- Next j
- Next i
-
- Sheets("学生评价").Range("A1").Resize(UBound(arr), UBound(arr, 2)) = arr
- Set d = Nothing
- End Sub
复制代码 |
|