View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default SUM all Instances Q

Are you using xl2007?

If you are, you may want to try =sum(sumifs(...))
(I didn't load xl2007 to try that.)

But this seemed to work for me in xl2003:

=SUM(SUMPRODUCT((A1:A10="London")*(B1:B10={1,2,3,4 ,5})*D1:D10))

Adjust the ranges to match--but you can't use whole columns (except in xl2007+).

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Seanie wrote:

A further twist on =SUM(SUMIF(B:B,{1,2,3,4,5},D:D))

How could I incorporate a further criteria eg. If ColA contains
"London" and if ColB contains one of 1,2,3,4,5 then add up all those
instance in ColD


--

Dave Peterson