• Make IF False Condition Return Blank or 0

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Make IF False Condition Return Blank or 0

    • This topic has 6 replies, 4 voices, and was last updated 24 years ago.
    Author
    Topic
    #356225

    Hello,
    I’m trying to use the IF function in EX2K(9.0.2)to evaluate a numeric condition and return the results of a cell containing a text-field when True and insert a blank when False

    IF(A2<2,C2,"")

    works nicely, but when I try to evaluate for two conditions, (one textual, the other numeric) using embedded IF's,

    IF(E2 X,IF(D2 > 2,C2,””),IF(D2 > 3,C2,””))

    the False condition returns a numeric “0”
    Most annoying.
    I’d appreciate any help sorting this out.

    TIA,
    Mark

    Viewing 2 reply threads
    Author
    Replies
    • #526805

      If X is text you should use “X”.

    • #526827

      Assuming X is to be replaced by a value, I can see nothing that can cause a 0 to be returned. Having set up some tests, when the condition is false then the cell remains blank. Is there some other factor that might be coming into play ?

      Andrew

    • #526852

      In both cases you’re returning C2 or “”. Is C2 equal to 0?
      ruth

      • #526986

        I tried your formula using “X” and it worked perfectly. Ruth’ point is very valid, I find when tracking down a glitch like this that if I put numbers like 666, 777 in vital places, the results stick out and cannot be confused with 0 and 1 which might be cell values or results returned by a function. This is very useful when developing nested IF

        • #527078

          Many thanks for the helpful tips. A beginner’s error, putting the X in quotes did the trick. Good debugging suggestions too.
          Muchas Gracias to all.
          Mark

      • #527079

        Hi Ruth,
        Sorry, I should have explained more. In this case, C2 holds text. (This is a variation of the label discussion we’re working on in the Word Forum) In this case “X” represents a label type that requires a more exacting criteria be met before it includes the text in C2.

        Mark

    Viewing 2 reply threads
    Reply To: Make IF False Condition Return Blank or 0

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

    Your information: