Sub Macro1()
'
Dim i As Integer
For i = 2 To 20
'If InStr(Range("b2"), "TD") > 0 Then [q2] = "1-Td" Else [r2] = 5 这个能实现预期,b2包含TD则“1-TD”,否则“5”
If InStr(Range("B" & i), "TD") > 0 Then ["Q" & i] = "1-Td" Else ["R" & i] = 5 希望能修改成b2到b20行,执行报错,错误“424”,要求对象
Next
'
End Sub