If & SumProduct

O

Otto Moehrbach

I thought this was rather simple until I tried to do it. What I want to do
is write an If formula that if True, use this SumProduct formula, if false
use that SumProduct formula.
I wrote this:
=If(E15="DOLLAR",SumProduct(A1:A5,B1:B5),SumProduct(A1:A5,B1:B5,C1:C5))

I think my problem is that the If formula uses the comma as a logical
separator and the SumProduct formulas have commas also and this upsets the
If formula.

I tried putting a single quote (apostrophe) around the SumProduct formulas
to no avail.

What am I doing wrong? And how do I do it right? Thanks for your help.
Otto
 
A

Aladin Akyurek

If you're on an American system, the formula should work as intended. On a
non-American system, you might need tr replace comma's by semi-colons, also
within the SumProduct parts.
 
O

Otto Moehrbach

Aladin
Thanks for your help. I am on an American system and it doesn't work.
When I get the error message that there is something wrong with my formula,
Excel highlights the word "DOLLAR", quotes too. Otto
 
J

Jerry W. Lewis

It works fine for me. What do you have in the cells, and what results
are you getting that makes you are unhappy?

Jerry
 
A

Anders S

Otto,

Your formula works fine for me on a non-US system.

I copied the formula from your message, pasted it into Excel, changed all commas to semicolons and changed the function names.

Here's what I got, why don't you try and change it back?

=OM(E15="DOLLAR";PRODUKTSUMMA(A1:A5;B1:B5);PRODUKTSUMMA(A1:A5;B1:B5;C1:C5))

HTH
Anders Silvén
 
G

Guest

The forumala works fine.. You're not entering the qoutes
in E15, are you? That would return a false response.
 
O

Otto Moehrbach

Aladin
Thanks again. With your response that the formula looked OK, I deleted
it and wrote it again. It works now. I did something in there that was not
right. Who knows? Thanks again. Otto
 

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