Sum Product if? Three columns

G

gmunro

Hello,

I am trying to determine a sumproduct for two ranges but only for rows
where data is not present in a third range

For instance

The range a2:A5 has the following values
2
1
1
1

The range C2:C5 has the values
5
10
15
18
The range B2:B5 are empty except cell B3

I want to write a formula that will give me the sum product of A2&C2,
A4&C4, A5&C5

Cells in range B2:B5 may vary if empty or not
The A & C ranges will be of variable length and values

Any help is appreciated

Glen
 
I

ImpulseBlue

this worked for me:
=SUM(IF(B2:B5<>"",A2:A5*B2:B5*C2:C5,0))

Enter as an array formula, ctrl-shift-enter
 
G

Guest

You can use sumproduct this way:
=SUMPRODUCT(A2:A5,C2:C5,--(B2:B5=""))
Change the ranges as appropiate

Hope this helps,
Miguel.
 
G

gmunro

Biff said:
Hi!

Try this:

=SUMPRODUCT(--(B2:B5=""),A2:A5,C2:C5)

Biff
This worked perfectly. You guys are the wind beneath my wings.
Incidentally, what does the -- mean"

Glen
 
G

gmunro

This worked perfectly thank you.
What does the "--" mean?
Can it be used in other functions?

Glen
 

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