• Formula with 2 IF’s and 3rd statement instead of 0 ending

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Formula with 2 IF’s and 3rd statement instead of 0 ending

    Author
    Topic
    #501067

    I am trying to write a formula that “forces” one to choose either one of the other.
    It’s an “On” or “Off” formula when either a 1 or a 0 is a *must* in the cell range
    The 1 or 0 is for a macro’s “If Then” VBA code

    =IF(G3=”0″,”On”), IF(G3=”1″,”Off”, “please enter 1 or 0 in Cell G3”)

    All I get is; #VALUE!
    The Formula goes in Merged cells H3 and I3

    What is the correct syntax ?

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1516429

      Your closing parenthesis is in the wrong place:
      =IF(G3=”0″,”On”, IF(G3=”1″,”Off”, “please enter 1 or 0 in Cell G3”))
      though if the cell should contain a numeric 1/0 rather than “1”/”0″, you should use:
      =IF(G3=0,”On”,IF(G3=1,”Off”, “please enter 1 or 0 in Cell G3”))

    Viewing 0 reply threads
    Reply To: Formula with 2 IF’s and 3rd statement instead of 0 ending

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: