相关疑难解决方法(0)

我使用OR在VBA上形成一个多条件IF ELSE语句,它不起作用

Dim cat As Integer
For cat = 2 To last
    Range("AB" & cat).Select

    If Selection.Value = " " Then
        ActiveCell.Offset(0, -2).Value = "-"
        ActiveCell.Offset(0, -1).Value = "-"

    ElseIf Selection.Value = "Address in local wording" Then
        ActiveCell.Offset(0, -2).Value = "Customer"
        ActiveCell.Offset(0, -1).Value = "Incomplete information or awaiting more info from customer"

    ElseIf (Selection.Value = "hold to console" Or "Hold to console" Or "Allocated 14/12 and ship next day") Then
        ActiveCell.Offset(0, -2).Value = "Depot"
        ActiveCell.Offset(0, -1).Value = "Allotment delay"

    ElseIf (Selection.Value = …
Run Code Online (Sandbox Code Playgroud)

vba if-statement multiple-conditions

3
推荐指数
1
解决办法
118
查看次数

标签 统计

if-statement ×1

multiple-conditions ×1

vba ×1