vba condition If..Then RRS feed

  • Question

  • Hi everyone,

    I have a short question related with the condition "if". Is it possible to set as a condition "If X=a+b Then"? or the condition if only registers X=z without any operation in it. 


    Wednesday, January 30, 2019 9:50 AM


  • The condition can be any expression that evaluates to True/False or even to a number (any non-zero number will be treated as True, and zero will be treated as False).

    So you can use

        If X = a + b Then


        If a + b Then

    Regards, Hans Vogelaar (

    Wednesday, January 30, 2019 10:05 AM