View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
daddylonglegs daddylonglegs is offline
external usenet poster
 
Posts: 287
Default Sumproduct function

Hello Bernd,

I take your point on double counting, although Peter's current formula will
also double-count. To avoid that and, especially for criteria ranges larger
than 3, to avoid very long formulas you could employ this

=SUMPRODUCT(--ISNUMBER(MATCH(A1:A100,F1:F3,0)),B1:B100)



"Bernd" wrote:

Hi Peter,

Be careful that you do not double count your values.

The general "or" formula is IMHO
=SUMPRODUCT(SIGN((A1:A100=F1)+(A1:A100=F2)+(A1:A10 0=F3)),B1:B100)

Other formulas might appear more elegant but if F1=F2 or F2=F3 or
F1=F3 then they could easily double count entries.

Regards,
Bernd