View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] kenicholls@gmail.com is offline
external usenet poster
 
Posts: 3
Default conditional sum macro

Hello - I am trying to generate a report based on some usage reports. I
have three columns, one with user names, one with usage description and
the final with corresponding usage quantity. Some of the usage
descriptions are synonymous so the usage quantity will be a sum of
synonymous categories. For example:

A B C
Green X 4
Green Y 10
Green Z 5
Smith X 3
Smith Y 5
Smith Z 2

In this example, column B has the usage description and for our report
we see X & Y as synonymous -- we would like to see usage results that
are the sum of these. E.g.

Green X/Y 14
Green Z 10
Smith X/Y 8
Smith Z 2
Etc.

This seems like a pretty straightforward =SUMIF problem
[=SUM(IF(A1:A$="Smith",IF(B1:B$="X,Y",C1:C$,0),0))] BUT there is of
course a caveat... The list of names is over 100 and I'd prefer to NOT
declare each one. Is there a way that I can use this formula where I
look for unique values in column A to groupby and then sum accordingly?