# "If statement"

Posted by Jim on May 14, 2001 5:06 PM

Can someone please show me how to write this fomula?
=If(E22"isn't equal to E14" then -G22 "Next" G6*B14
*A14

Posted by Mark W. on May 14, 2001 5:09 PM

I trust you mean "Else" instead of "Next", and
that your really want to negate G22...

=IF(E22 &LT;&GT; E14,-G22,G6*B14*A14)

Posted by Jim on May 14, 2001 5:39 PM

G6"3000"*B14"1",G14 ="3000", E14"6", E22"4" since
E14 does not equal E22 i need to subtract G22"100"
From G14"3000" ans. should be 2900 but it returns
-100 ? If E14 = E22 No subtraction? i hope this
makes some kind of sence.

Posted by Kevin James on May 14, 2001 8:30 PM

Makes perfect sense after a couple beers

=IF(E14&LT;&GT;E22,G14-G22,"")

Posted by Mark W. on May 14, 2001 8:34 PM

> i hope this makes some kind of sence.

I'm afraid not. It seems that you want this
formula to affect the cell (G14) in which it
resides....

=IF(E22 &LT;&GT; E14,G14-G22,G6*B14)

...this is known as a circular reference, and
Excel does not allow them.

Posted by Jim on May 14, 2001 8:56 PM

Re: Makes perfect sense after a couple beers

True, that formula does return circular but
i'm getting True or False, Example:
=If(E22&LT;&GT;E14,-G22,*B14*A14)=(If(E22=E14,G6*B14
*A14)) if i could get it to return an integer
i could move on and open another can of worms.
Jim

Posted by Kevin James on May 15, 2001 10:56 AM

Re: Makes perfect sense after a couple beers

Jim,

I didn't get a circular reference when I used it. All I can think is that you have entered the formula in one of the cells that is referenced in the formula. The formula I provided works and returns 290 but I entered it into a cell other than the four you mentioned in your original posting.

Kevin