Formula Error

Y

YB Girl

I don't think I described it right. This is what I am trying to do:

One formula... If a sum of numbers is greater than 0, multiply that sum by
a number and then add that number to another sum of numbers multiplied by
another number.
 
C

Conan Kelly

YB Girl,

Please provide more detail. Give actual examples with expected results.

For example:
If (1+2) > 0 then ((1+2) * 3) + ((4+5)*6) else 0 (or nothing or error
message or (1+2) or ((1+2)*3)

=IF(sum(A1:A2)>0,(sum(A1:A2)*A3)+(sum(A4:A5)*A6),"the sum is not greater
than zero!!!")

Also you say "If a sum of numbers is greater than 0", what results do you
want if it is less than/equal to 0?

HTH,

Conan
 
P

PCLIVE

Your request seems pretty straight forward with the exception of some
confusing wording.

If the sum of a numbers (A1:A5) is > 0, then multiply sum by a number (C1).
Then add that sum to another sum of numbers (B1:B5) multiplied by another
number (C2). Ok, so what if the first sum is not greater than zero? In my
formula below, I have it returning blank.

=IF(SUM(A1:A5)>0,(SUM(A1:A5)*C1)+(SUM(B1:B5)*C2),"")

HTH,
Paul
 
E

Ed Cones

If I use your exact wording and reduce it to a formula:

If( {a sum of numbers} > 0, ({a sum of numbers} * {a number}) + ( {another
sum of numbers} * {another number}), ????)

Let's say that "a sum of numbers" is sum(a1:a10)
"a number" is b1
"another sum of numbers" is sum(c1:c10)
"another number" is d1

You didn't say what to do if "a sum of numbers" is not greater than 0, so I
inserted "????"

If(sum(a1:a10) > 0, (sum(a1:a10) * b1) + ( sum(c1:c10) * d1), ????)

OK. There's my stab at the solution ;o)
 
Y

YB Girl

If the first sum of numbers is not greater than 0, then my answer is simply
the second sum of numbers multiplied by a number. In other words, if the
first sum of numbers is 0, I just want 0 added to the second part of the
equation.
 
P

PCLIVE

Ok, you don't really need an IF statement here.

=(SUM(A1:A5)*C1)+(SUM(B1:B5)*C2)

HTH,
Paul




--
 

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

Top