=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.
Bob Phillips explains =sumproduct() in much more detail here:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html
Paul Kaye wrote:
>
> On Jul 10, 3:04 pm, Gary''s Student
> <GarysStud...@discussions.microsoft.com> wrote:
> > =SUMPRODUCT(A1:A100,--(B1:B100<>"")) adjust the range to suit.
> > --
> > Gary''s Student - gsnu2007j
> >
> > "Paul Kaye" wrote:
> > > How can I add the values in a column according to values in another
> > > column? If there is any value in a row in column B, I want to include
> > > the value of the corresponding row in column A. I'm flexible as to
> > > whether this is ANY value (i.e. not empty) or greater than zero.
>
> What does the -- and <> do? I really don't understand that formula!
--
Dave Peterson