VBA 语言Dim arr(), brr 语句一直提示错误,找不到工程或库,请大家伙帮忙看下 5
Dimarr(),brrx=Range("a65536").End(xlUp).Rowy=Range("c65536").End(xlUp).Rowbrr=Range("...
Dim arr(), brr
x = Range("a65536").End(xlUp).Row
y = Range("c65536").End(xlUp).Row
brr = Range("a1:b" & x)
ReDim arr(1 To x, 1 To 2)
For i = 1 To x
s1 = Application.WorksheetFunction.CountIf(Range(Cells(1, 1), Cells(i, 1)), Cells(i, 1))
For j = 1 To y
s2 = Application.WorksheetFunction.CountIf(Range(Cells(1, 3), Cells(j, 3)), Cells(j, 3))
If Cells(i, 1) = Cells(j, 3) And s1 = s2 Then arr(i, 1) = Cells(j, 3): arr(i, 2) = Cells(j, 4)
Next j
Next i
每次都是在第二行那里出问题
之前在2003里面是没问题的,在2007就出问题了 展开
x = Range("a65536").End(xlUp).Row
y = Range("c65536").End(xlUp).Row
brr = Range("a1:b" & x)
ReDim arr(1 To x, 1 To 2)
For i = 1 To x
s1 = Application.WorksheetFunction.CountIf(Range(Cells(1, 1), Cells(i, 1)), Cells(i, 1))
For j = 1 To y
s2 = Application.WorksheetFunction.CountIf(Range(Cells(1, 3), Cells(j, 3)), Cells(j, 3))
If Cells(i, 1) = Cells(j, 3) And s1 = s2 Then arr(i, 1) = Cells(j, 3): arr(i, 2) = Cells(j, 4)
Next j
Next i
每次都是在第二行那里出问题
之前在2003里面是没问题的,在2007就出问题了 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询