Need help with a formula

G

Guest

My formual should look like this:

=IF(I9<=0,(G9-F9)/F9,(H9-G9)/G9,(I9-H9)/H9))

but I keep getting an error message saying too many arguments. How can I
overcome this? Please advise.
 
G

Guest

You do have too many arguments. What your formula is saying:

IF: I9 >=0
THEN: (G9-F9)/F9
ELSE: (H9-G9)/G9
?: (I9-H9)/H9

The extra (I9-H9)/H9 doesn't fit. Maybe if you explained what you wanted to
accomplish we could help you write the formula.

Elkar
 
G

Guest

If I am not mistaken you have the Logical_Test and 3 possible results. IF
statements have a True or False output.
 
G

Guest

What I need to do is:

Compare Column B to A and get the difference in %. Then I will compare C to
B and get the different in % and then the same on Column D to C.

Hope this makes sense.

Phxlatinoboi®
 
G

Guest

Ok, I'm still unclear what you're trying to do here. I don't see where an IF
Statement comes into play at all. Also, I'm not sure how your Columns A-D
relate to Columns F-I in your formula.

That said, to get the percent differences, I think you can use these formulas:

Difference from B to A: =(B9/A9)-1
Difference from C to B: =(C9/B9)-1
Difference from D to C: =(D9/C9)-1

HTH,
Elkar
 
G

Guest

Elkar,

I have 5 cells i use. F9, G9, H9. I9 & S9. The values of cells are taken
from another worksheet. What I am trying to do is this.

if there is value in G9 minus that from F9 and divide by F9 to give me the %
in S9. Now if there is value in H9 then I will minus that from G9 and divide
it by G9 to get the % in S9. Now if there is value in I9 that will be minued
from H9 and then divided by the value in H9 to get % for S9.

The formula I want is in S9.

Hope this makes sense.. Also, someone here mentioned I could nest and get
the formula to work. What is nesting?

The formual again that I want to use is:

-if(I9<=0,(G9-F9)/F9,(H9-G9)/G9),(I9-H9)/H9)
 
S

Sandy Mann

Phxlatinoboi® said:
Elkar,

if there is value in G9 minus that from F9 and divide by F9 to give me the
%
in S9. Now if there is value in H9 then I will minus that from G9 and
divide
it by G9 to get the % in S9. Now if there is value in I9 that will be
minued
from H9 and then divided by the value in H9 to get % for S9.
What you have posted does not make sense, (at least to me).
if there is value in G9 minus that from F9 and divide by F9 to give me the
%
in S9

If there is a value in G9 then after this calculation the function is
finished. It will only get past this point if G9 is empty but:

in S9. Now if there is value in H9 then I will minus that from G9 and
divide
it by G9 to get the % in S9

How can you Minus H9 from G9 when by definition G9 is empty?

In the same way the calculation can only get into the last part of your
explanation if G9 and H9 are both empty so how can you use H9 in the
calculation?

--
HTH

Sandy
(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
G

Guest

Ok, that makes more sense. Based on your description, I think this is what
you're looking for:

=IF(I9<>0,(H9-I9)/I9,IF(H9<>0,(G9-H9)/H9,IF(G9<>0,(F9-G9)/G9,0)))

A Nested statement is where you plug in a function as criteria within
another function. So, the above uses Nested IF Statements. So, if the first
part of the formula resolves to FALSE, then it will consult a second IF
Statement, and if that results to FALSE, then a third. You can "nest" up to
7 functions.

HTH,
Elkar
 
G

Guest

AWESOME!!! Now the only thing left is that when I get my results in S9 it no
longer changes color (ie red - negative, black positive)

What can I do for that?
 
G

Guest

Now the only thing left is that when I get my results in S9 it no
longer changes color (ie red - negative, black positive)

What can I do for that?
 

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

Similar Threads

Need Help 5
IF AND problem 5
Formula help! 2
Function for a nested if statement 2
Help with Formula 5
Calculating time 3
Quick help with a simple function! 4
Calculate Overtime double time 1

Top