为什么会出现类型不匹配?求大佬解答
Sub test()
For i = 2 To 111
If Cells(i, 3).Value = Cells(i, 4).Value Then
Cells(i, 5).Value = Cells(i, 4).Value
End If
If Cells(i, 4).Value = "#N/A" Then
Cells(i, 5).Value = Cells(i, 3).Value
End If
If Cells(i, 3).Value = "#N/A" Then
Cells(i, 5).Value = Cells(i, 4).Value
End If
Next
End Sub
数据如下
| 债权主体评级cells(i,3) | 担保主体评级cells(i,4) |
| AAA | AA |
| A- | #N/A |
| AAA | #N/A |