Thread: "IF" Function
View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Boblink Boblink is offline
external usenet poster
 
Posts: 20
Default Follow-up If and MAX function questions?



"Thank you for your help guys, fyi I am trying to create a Retirement
Spreadsheet so I have replicated the formulas across columns "B" thru "AL"
(which represent years 2008-2044), and think that the problem is NOT with the
formula in row 40 but with a formula in ROW 13 (which is one of the cells
that the formula in row 40 references).

The cells in row 13 currently have a value of +99, and I tried this formula:

=IF(AND(B110,99-B440),99,B44-99)

but it does not come up with the results that I am looking for. What I want
is:

- if the value in cell B11 is positive, then the value +99 should appear in
cell B13

- if the value of cell B11 is negative, then the next calculation should be
+99 less the value in cell B44. If this result in a positive number, than
the POSITIVE value only should appear in cell B13

- if this result in a positive number, then that number should appear in
cell B13

- If the result is a negative number, then a "zero" should be appear in
cell B13

The formula that I have (=IF(AND(B110,99-B440),99,B44-99) displays +99 for
B13 when the value in cell B11 is positive (which is what I want), but it
displays a negative number when the value in B11 is "zero".

What I would like is, when the value in cell B11 is "zero", the value in
cell B13 should be +99-B44 but only until the value is POSITIVE, a positive
number ONLY should be displayed in B13.
Once the value in B11 is negative and the result of €œ+99 €“B44€ has become
negative, then "zero" should be displayed in cell B13.
Example:

- B11=125
- B44= 80
- C11=0
- C44=120
- D11=0
- D44=150

B13 - the calculations for cell B13 should be: "+99" , because there is
a positive value <+125 in cell B11

C13 - the calculations for cell C13 should be: "+99€, because 99-120=
-21, therefore only a positive value, "+99" should be displayed / should
appear, in cell C13

D13 - the calculations for cell D13 should be: "zero", because the
results in C13 resulted in a negative number (i.e. the only number that
should appear is "+99" or "a POSITIVE number only when +99 is subtracted from
cell 44 or "zero" when the calculation of "+99 less the value in cell 44" is
negative)

Dana, as you can probably tell, I am just familiarizing myself with the €œIF€
function and have NOT used the €œMAX€ function. From your example, where you
suggested:

=MAX(B13-B44,0)
is to be used instead of
=IF(B13-B440,B13-B44,0)
It certainly would make sense to use the MAX function (i.e. smaller formula
= less chance for errors), if it gets the same results.
I have not located where I used:
=IF(B13-B440,B13-B44,0)
but being that this is a dynamic exercise, it might have been in a earlier
iteration nevertheless, when I tried to incorporate it into the correct
SpreadSheet, it did not result in the same calculations so I must have
misunderstood and / or, NOT followed what you suggested.


Lars, I assume that you are Swedish? What part of Sweden do you live in?
My wife grew up in Malma.

Thank you again for your help guys,
Bob