View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Umlas[_3_] Bob Umlas[_3_] is offline
external usenet poster
 
Posts: 320
Default Sum of absolute values based on criteria

=SUMPRODUCT(N(B2:B5="a"),ABS(A2:A5))
=SUMPRODUCT(N(B2:B5="b"),ABS(A2:A5))

"ckemler" wrote in message
...
In this example:
Value Criteria
1 a
-2 a
-3 b
4 b
I want to sum the absolute values of criteria a and another sum of
absolute
values of criteria b.
I've been researching this and started learning VBA, but I can't get the
answer. Does anybody have any insight?

Thanks,
Chris