斜体部分不知道怎么用变量(tt),之前写range里用变量可以用&但是这里就报错了
另外可以用自己写的函数numname()出来的值直接带入subtotal函数吗?
If totalcount >= 2 Then
Dim t As Integer
For t = 1 To lc
Debug.Print numname(t)
Dim nn As Integer
nn = numname(t)
Debug.Print nn
** Sheets(2).Cells(totalrow2 + 1, t + 1).Formula = _"SUBTOTAL("109,"&tt&":"&tt)"_**
Debug.Print Sheets(2).Cells(totalrow2 + 1, t + 1)
arr(2, t) = Sheets(2).Cells(totalrow2 + 1, t + 1)
Debug.Print arr(2, t)
Next t
End If