关于VBA筛选重复数据代码问题?
Subtest1()DimxAsLongDimyAsLongForx=3To2000Fory=3To2000IfRange("a"&x)=Range("h"&y)Then...
Sub test1()
Dim x As Long
Dim y As Long
For x = 3 To 2000
For y = 3 To 2000
If Range("a" & x) = Range("h" & y) Then
Range("c" & x) = Range("i" & y)
End If
Next x
Next y
End Sub
错误提示:无效的NEXT变量控件
请问什么原因?代码对吗? 展开
Dim x As Long
Dim y As Long
For x = 3 To 2000
For y = 3 To 2000
If Range("a" & x) = Range("h" & y) Then
Range("c" & x) = Range("i" & y)
End If
Next x
Next y
End Sub
错误提示:无效的NEXT变量控件
请问什么原因?代码对吗? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询