Or Operator

αž”αž„αŸ’αž€αžΎαžβ€‹αž€αžΆαžšβ€‹αž”αŸ†αž”αŸ‚αž€β€‹αžαž€αŸ’αž€β€‹αžœαž·αž‡αŸ’αž‡αžΆ OR αž›αžΎβ€‹αž€αž“αŸ’αžŸαŸ„αž˜β€‹αž–αžΈαžšΒ αŸ”

αžœαžΆαž€αŸ’αž™β€‹αžŸαž˜αŸ’αž–αž“αŸ’αž’ αŸ–

Result = Expression1 Or Expression2

αž”αŸ‰αžΆαžšαŸ‰αžΆαž˜αŸ‰αŸ‚αžαŸ’αžš αŸ–

αž›αž‘αŸ’αž’αž•αž›β€‹ αŸ– αž’αžαŸαžšβ€‹αž›αŸαžβ€‹αžŽαžΆβ€‹αž˜αž½αž™ αžŠαŸ‚αž›β€‹αž˜αžΆαž“β€‹αž›αž‘αŸ’αž’αž•αž›β€‹αž“αŸƒβ€‹αž€αžΆαžšβ€‹αž”αŸ†αž”αŸ‚αž€Β αŸ”

αž€αž“αŸ’αžŸαŸ„αž˜β€‹αž‘αžΈβ€‹1, αž€αž“αŸ’αžŸαŸ„αž˜β€‹αž‘αžΈβ€‹2 αŸ– αž€αž“αŸ’αžŸαŸ„αž˜β€‹αž›αŸαžβ€‹αž˜αž½αž™β€‹αž…αŸ†αž“αž½αž“β€‹ αžŠαŸ‚αž›β€‹β€‹αž’αŸ’αž“αž€β€‹β€‹αž…αž„αŸ‹β€‹β€‹αž”αŸ’αžšαŸ€αž”β€‹αž’αŸ€αž”Β αŸ”

αž€αžΆαžšβ€‹αž”αŸ†αž”αŸ‚αž€β€‹αžαž€αŸ’αž€β€‹αžœαž·αž‡αŸ’αž‡αžΆ OR αž“αŸƒβ€‹αž€αž“αŸ’αžŸαŸ„αž˜β€‹αž”αŸŠαžΌαž›αžΈαž“β€‹αž–αžΈαžšβ€‹αžαŸ’αžšαž‘αž”αŸ‹β€‹αžαž˜αŸ’αž›αŸƒβ€‹αž–αž·αž αž”αŸ’αžšαžŸαž·αž“β€‹αž”αžΎβ€‹β€‹β€‹β€‹β€‹β€‹β€‹αž€αžΆαžšβ€‹αž”αŸ’αžšαŸ€αž”β€‹αž’αŸ€αž”β€‹αž€αž“αŸ’αžŸαŸ„αž˜β€‹αž˜αžΆαž“β€‹αž˜αž½αž™β€‹αž–αž·αžβ€‹β€‹Β αŸ”

αž€αžΆαžšβ€‹αž”αŸ’αžšαŸ€αž”αž’αŸ€αž”β€‹αž”αŸ’αžšαž˜αžΆαžŽαžœαž·αž’αžΈβ€‹ bit-wise αž€αŸ†αžŽαžαŸ‹β€‹αž”αŸŠαžΈαžβ€‹αž€αŸ’αž“αž»αž„β€‹αž›αž‘αŸ’αž’αž•αž› αž”αŸ’αžšαžŸαž·αž“β€‹αž”αžΎβ€‹αž”αŸŠαžΈαžβ€‹αžŠαŸ‚αž›β€‹αžαŸ’αžšαžΌαžœβ€‹αž‚αŸ’αž“αžΆβ€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž€αŸ†αžŽαžαŸ‹β€‹αž€αŸ’αž“αž»αž„β€‹αž€αž“αŸ’αžŸαŸ„αž˜β€‹αž™αŸ‰αžΆαž„β€‹αžαž·αž…β€‹αž˜αž½αž™β€‹αž“αŸƒβ€‹αž€αž“αŸ’αžŸαŸ„αž˜β€‹αž–αžΈαžšΒ αŸ”

αž§αž‘αžΆαž αžšαžŽαŸ αŸ–

Sub ExampleOr

Dim vA As Variant, vB As Variant, vC As Variant, vD As Variant

Dim vOut As Variant

    vA = 10: vB = 8: vC = 6: vD = Null

    vOut = vA > vB Or vB > vC ' -1

    vOut = vB > vA Or vB > vC ' -1

    vOut = vA > vB Or vB > vD ' -1

    vOut = (vB > vD Or vB > vA) ' 0

    vOut = vB Or vA ' 10

End Sub