Formula Help PLease

J

Jennifer

Hi,

Could someone tell me what's wrong with this formula?

=IF((C1=C2),"",OR(IF((C1>C2),"C2-C1"),OR(IF((C1<C2),"C2-C1"))

Thank you.
 
A

Alan Baybut

Hi,

Could someone tell me what's wrong with this formula?

=IF((C1=C2),"",OR(IF((C1>C2),"C2-C1"),OR(IF((C1<C2),"C2-C1"))

Thank you.

Hi,

I assume that what you are trying to do is show a blank cell if C1=C2
but if C1 is greater than C2, or C2 is greater than C1, then you want
to show the value of C2 minus C1?

Currently you are showing C2-C1 within quotes which would return the
text string "C2-C1" rather than a value.

If my assumption is right then this formula should work
=if(C1=C2,"",C2-C1)

Hope that helps

Alan
 
J

joeu2004

Jennifer said:
Could someone tell me what's wrong with this formula?
=IF((C1=C2),"",OR(IF((C1>C2),"C2-C1"),OR(IF((C1<C2),"C2-C1"))

Well, it would be helpful if __you__ told us what is wrong with it.

That is, what does it do that you don't like? And what result do you want
when C1=C2, C1<C2 and C2>C1?

We are not mindreaders. But sometimes our wild-a.s.s guesses hit the mark.
Perhaps one of the following meets your needs:

=IF(C1=C2,"",C2-C1)

or

=IF(C1=C2,"",ABS(C2-C1))

(The latter assumes you have a typo in the last term of your IF expression,
among other mistakes.)
 

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