Re: conditional summing



Instead of
=sum(if(H7:H12="a",J7:J12))
you probably should do
=sum(if(H7:H12="a",J7:J12,0))
if should supply an output for FALSE conditions!

Instead of
=sum(if(and(H7:H12="a",H7:H12="a"),J7:J12))
you can do
=sum(if(H7:H12="a",1,0)*if(H7:H12="a",1,0)*J7:J12))
(of course, having the same condition twice does not make sense)



Terry Bolands wrote:
Can someone explain why this works:

=sum(if(H7:H12="a",J7:J12))

but this does not:

=sum(if(and(H7:H12="a",H7:H12="a"),J7:J12))

or how to get something similar to the latter working?


TIA,
TB



                
__________________________________ Do you Yahoo!? All your favorites on one personal page – Try My Yahoo! http://my.yahoo.com _______________________________________________
gnumeric-list mailing list
gnumeric-list gnome org
http://mail.gnome.org/mailman/listinfo/gnumeric-list



--
Erich Neuwirth, Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-38624 Fax: +43-1-4277-9386



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]