SUMPRODUCT vs Arrays

C

Charley Kyd

I've been using SUM-IF array formulas since Excel 4. But recently, I've
tried to use SUMPRODUCT instead.

That is...
{=SUM(IF((Name="Smith")*(State="Utah"),Amount,0))}
....does the same thing as...
=SUMPRODUCT(0+(Name="Smith"),0+(State="Utah"),Amount)
....but without the inconvience of arrays.

However, today I realized that if Amount is wider than one column,
SUMPRODUCT fails but SUM-IF works.

Am I mising something? Is there a simple way to make SUMPRODUCT work when
Amount is a dynamic range that could define any number of columns?

Charley
 
H

Harlan Grove

Charley Kyd said:
=SUMPRODUCT(0+(Name="Smith"),0+(State="Utah"),Amount) ....
However, today I realized that if Amount is wider than one column,
SUMPRODUCT fails but SUM-IF works.

Am I mising something? Is there a simple way to make SUMPRODUCT work
when Amount is a dynamic range that could define any number of columns?

=SUMPRODUCT((Name="Smith")*(State="Utah")*Amount)
 

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