|
本帖最后由 haohaizi007 于 2015-6-16 19:32 编辑
我那个问题2,我自己查了一下,编了一段代码,但是运行的时候显示
对象 _default 的方法 Range 失败
请老师们指点一下该怎么做。 谢谢
Sub 宏5()
'
'宏5 宏
Dim i As Integer
For i = 4 To 429
If Cells(R, i) = "√" Or "△" Then
Cells(T, i) = "12"
End If
If Cells(R, i) = "" Then
Cells(T, i) = "11"
End If
If Cells(Q, i) = "" Then
Cells(T, i) = "10"
End If
If Cells(P, i) = "" Then
Cells(T, i) = "9"
End If
If Cells(O, i) = "" Then
Cells(T, i) = "8"
End If
If Cells(N, i) = "" Then
Cells(T, i) = "7"
End If
If Cells(M, i) = "" Then
Cells(T, i) = "6"
End If
If Cells(L, i) = "" Then
Cells(T, i) = "5"
End If
If Cells(K, i) = "" Then
Cells(T, i) = "4"
End If
If Cells(J, i) = "" Then
Cells(T, i) = "3"
End If
If Cells(i, i) = "" Then
Cells(T, i) = "2"
End If
If Cells(H, i) = "" Then
Cells(T, i) = "1"
End If
If Cells(G, i) = "" Then
Cells(T, i) = "0"
End If
Next
End Sub
haohaizi007 发表于 2015-6-13 16:56
感谢老师回复。
按照老师指点,改成
If Cells(i, "R") = "√" Or cells(i,"R")="△" Then
改成这样
|
|