'If' problem

K

Kanga 85

I have an 'if' problem which I don't understand and cannot solve.

Cell H2 contains a formula delivering either a value (>0) or "".
The formula in I2 reads '=IF(VALUE(H2)>0,"sold","-")'. This works
correctly if value(H2)>0, but otherwise returns '#VALUE!'.

Thanks in advance for any help to what must be a simple problem.
 
J

JBeaucaire

Kanga said:
Cell H2 contains a formula delivering either a value (>0) or ""
The formula in I2 reads '=IF(VALUE(H2)>0,"sold","-")'. This work
correctly if value(H2)>0, but otherwise returns '#VALUE!'

Thanks in advance for any help to what must be a simple problem

If the formula in H2 shows the text string ">0" (without the quotes)
then your IF formula needs to treat that cell as text. Whatever i
showing in cell H2 needs to be EXACTLY tested. So if it's >0 then tes
for ">0", if it shows (>0), then test for "(>0)"

=IF(H2=">0","sold","-"
o
=IF(H2="(>0)","sold","-"

Now, if you change the formula in H2 to just result in numbers, the
your original formula will work. So look at that possibility, too

Can you show me the formula from H2
 
T

T. Valko

My interpretation of the OP is that H2 will contain either a formula blank
or a number.
=IF(OR(H2="",H2+0<=0),"-","sold")

If H2 ="" then H2+0 will cause a #VALUE! error.
 
K

Kanga 85

Thanks to you all for your useful replies. The problem is now solved, and
you have provided me with further insight. The formula in H2 is:
=IF(F2>0,D2*G2,"")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top