View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Array Formulas - Unique List from List with Duplicates

Let's assume the data to be in columns A (term), B (Cat) and C (Amount),
with labels in row 1 and data in rows 2 to 500.
Repeat the labels in E1:G1
Enter the Terms codes (S, L) in E2 and down and the Category codes (Cat1,
Cat2...) in F2 down
In G2 enter =SUMPRODUCT(--($A$2:$A$500=E2),--($B$2:$B$500=F2),$C$2:$C$500)
Enter this in the normal way, it is NOT an array function
Copy this down the G row
Done
For explanations of SUMPRODUCT see

http://www.xldynamic.com/source/xld.SUMPRODUCT.html

http://mcgimpsey.com/excel/formulae/doubleneg.html

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email


"Johnny Meredith" wrote in message
ups.com...
Hi all,

I've seen several posts on this subject, but I have a particular
situation I can't figure out.

I have a list that looks like this:

Term Category Amount
S Cat1 100
L Cat1 50
L Cat2 25
S Cat3 10
L Cat3 30

I want this result:

Term Cateogry Amount
S Cat1 100
S Cat3 10
L Cat1 50
L Cat2 25
L Cat3 30

The totals for both lists equal 215. Basically, I need to produce a
unique list of Categories by Term. I need to do this with an array
formula is possible. So the array formula would have to look at Term
(there will always only be two Term values: S & L) and pick unique
Categories (there will be many categories and the categories will
change periodically). I can handle the Amount column with SUMIF
functions. The PivotTable option is not possible. Any ideas?

Thanks in Advance,
Johnny