View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default If then Statments

On Jan 20, 8:46*am, Tina wrote:
I have a number based on flucuating metal prices and
a constant that is the cost of the part right now.
*I want to write a formula that will give me if the number
increases/decreases then add/subtract the difference to
another column. *For some reason I can get the first part
=IF(k2<2.489,) but i don't know how to finish the formula.


As I understand your problem (not very well, I admit), all you need
is:

=A1 + K2 - 2.489

where K2 is "the number [that] increases/decreases" compared to a
constant (2.489), and A1 is "another column" (cell) to which you want
to "add/subtract the difference" between K2 and the constant.

Caveat: It is unlikely that K2 will ever exactly equal 2.489, even if
it appears that way, unless you enter that number into K2. To be sure
that the difference is WYSIWYG, if you display to 3 decimal places, it
might be better to write:

=A1 + (round(K2,3) - 2.489)