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

这应该得到的第一个值不是空白或问号,但是它不会在 else 部分中返回此值。谁能指出这段代码有什么问题?

4

1 回答 1

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
于 2012-05-28T11:55:22.543 回答