vlookup and Sum unique values

D

Diggsy

Hello,
I am trying to do a vlookup on Group Names and return a sum of the unique
values only. I have many Group names all over this sheet and much of this is
repeated (It is important for that sheet). However I just need to have a sum
of all unique values.
For example


Column A Column B
Group Name Number in Group

F8 20
F7 30
F7 5
F8 20
F7 10
F8 5
F7 30
F7 5
F8 15
F8 5
F8 15

The reu;lt would return a total of 40 for F8(20 + 15 + 5)

and a total of 45 for F7 (30 + 5 + 10)

Thanks

chris
 
T

Teethless mama

=SUM(IF(FREQUENCY(IF(RngA="F8",MATCH(RngB,RngB,0)),MATCH(RngB,RngB,0))>0,RngB))

ctrl+shift+enter, not just enter
 
M

Mike H

Hi,

Try this
=SUM(IF(FREQUENCY(IF(A2:A12=C1,MATCH("~"&B2:B12,B2:B12&"",0)),ROW(B2:B12
)-ROW(B2)+1),B2:B12))

Where C1 is the group you want to sum
This is an array so commit with CTRL+Shift+Enter

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top