Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 139
Default If then Statments

Okay this is what I have. 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. Please help.

Tina
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default If then Statments

If the value in K2 is not equal to 2.489, then display the difference
between K2 and A1
Try these out. You may need to reverse K2 and A1 - and only you know what to
use for A1
=IF(K2<2.489,K2-A1,"no change")
=IF(K2<2.489,K2-A1,"")
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Tina" wrote in message
...
Okay this is what I have. 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. Please help.

Tina



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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)
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 139
Default If then Statments

This is very good but I only want the difference from cell A to be added or
subtracted from a.

"Bernard Liengme" wrote:

If the value in K2 is not equal to 2.489, then display the difference
between K2 and A1
Try these out. You may need to reverse K2 and A1 - and only you know what to
use for A1
=IF(K2<2.489,K2-A1,"no change")
=IF(K2<2.489,K2-A1,"")
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Tina" wrote in message
...
Okay this is what I have. 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. Please help.

Tina




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 139
Default If then Statments

Well the real issue is that if the metal price (A) changes I need to add or
subtract the difference in the change to or from the orginial price.

"joeu2004" wrote:

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)



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default If then Statments

On Jan 20, 11:28 am, Tina wrote:
Well the real issue is that if the metal price
(A) changes I need to add or subtract the difference
in the change to or from the orginial price.


I believe that is the formula I provided.

In your original formula, what is K2, and what is 2.489?

I assumed that K2 is the current price, and 2.489 is the previous
price. In my example, A1 is a cell in the "another column" to which
you want to add or subtract the difference.

Note that if there is no difference (K2 = 2.489), we "add or subtract"
zero. No harm in that.

Of course, if you would like that difference in a cell of its own,
then write:

=K2 - 2.489

If that is cell K3, then my original formula becomes =A1+K3 .

If I misunderstood, I suggest that you stop talking in abstract terms
(names like "A" and "a" in your response to Bernard), and start
talking in Excel terms (real cell names, clearly identifying their
purpose).


----- original posting -----

On Jan 20, 11:28*am, Tina wrote:
Well the real issue is that if the metal price (A) changes I need to add or
subtract the difference in the change to or from the orginial price.



"joeu2004" wrote:
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)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If statments Lweiss Excel Worksheet Functions 2 March 20th 08 08:01 AM
If Statments Jason Excel Discussion (Misc queries) 2 January 3rd 08 05:33 PM
Problem I need Help With -- IF Statments debra Excel Discussion (Misc queries) 3 November 14th 07 05:14 PM
under standing if statments zx12rbullet Excel Worksheet Functions 2 July 21st 07 10:16 PM
AND OR IF Statments Rogie Excel Worksheet Functions 3 February 12th 07 04:01 AM


All times are GMT +1. The time now is 12:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"