了解了~
可否解說下面的寫法
For i = 1 To UBound(Arr)
T = Arr(i, 1): R = xD(T)
If R = 0 Then
N = N + 1: R = N: xD(T) = N
Brr(R, 1) = Arr(i, 1): Brr(R, 2) = Arr(i, 2): Brr(R, 3) = Arr(i, 3)
End If
C = Application.Match(Arr(i, 4), Array("國語", "英文", "數學", "物理", "化學"), 0)
Brr(R, C + 3) = Arr(i, 5)
若之後想要再增加一個科目
C = Application.Match(Arr(i, 4), Array("國語", "英文", "數學", "物理", "化學","社會"), 0)
Brr(R, C + 3) = Arr(i, 6)