# Thread: Make IF False Condition Return Blank or 0

1. ## Make IF False Condition Return Blank or 0

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

2. ## Re: Make IF False Condition Return Blank or 0

If X is text you should use "X".

3. ## Re: Make IF False Condition Return Blank or 0

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

4. ## Re: Make IF False Condition Return Blank or 0

In both cases you're returning C2 or "". Is C2 equal to 0?
ruth

5. ## Re: Make IF False Condition Return Blank or 0

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

6. ## Re: Make IF False Condition Return Blank or 0

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

7. ## Re: Make IF False Condition Return Blank or 0

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

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•