If ActiveSheet.Cells(myRow, 3).Value = "" Then
APCtext = "" & APC = 2
ElseIf ActiveSheet.Cells(myRow, 3).Value = "?" Then
APCtext = "Unknown" & APC = 3
Else
APCtext = ActiveSheet.Cells(myRow, 3).Value & APC = 1
End If
这应该得到的第一个值不是空白或问号,但是它不会在else部分返回此值。任何人都可以指出这段代码有什么问题吗?
答案 0 :(得分:0)
试试这个:
If ActiveSheet.Cells(myRow, 3).Value = "" Then
APCtext = ""
APC = 2
ElseIf ActiveSheet.Cells(myRow, 3).Value = "?" Then
APCtext = "Unknown"
APC = 3
Else
APCtext = ActiveSheet.Cells(myRow, 3).Value
APC = 1
End If