View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
daddylonglegs
 
Posts: n/a
Default Isolating months


Is this shorter? :)

=SUMIF(A:A,"=C1",B:B)-SUMIF(A:A,"C2",B:B)

The -- coerces the TRUE/FALSE arrays produced by something like
(A1:A100=C1) to 1/0 values that SUMPRODUCT can multiply and sum, you
could do the same with +0 or *1, e.g.

=SUMPRODUCT((A1:A100=C1)+0,(A1:A100<=C2)*1,B1:B10 0)

you don't have to coerce the B1:B100 array because this is numeric


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=521866