How to add up values down a column when there are multiple rows per data owner?

elef3u

New member
Joined
Apr 14, 2016
Messages
2
Reaction score
0
Points
0
I'm using Excel to manage the contacts for organization my company is partnered with. Each organization (Column A) is listed multiple times (multiple rows for each organization; one row for each individual contact person we have for that company).

I want to have a running "total members represented by our partner organizations" cell at the bottom of Column B. A simple sum won't work, because it adds up all the values in the column, and I just need it to add each organization's membership number once. (So only 10,000 for ABC organization, not 30,000).

So, the correct sum for total number of members across all organizations in this sample table is 41,000. A simple sum of Column B gives a total of 86,000.

How do I do this?!

Organization NameMembersAssociation TypeContact Name
ABC10,000Type 1John
ABC10,000Type 1Beth
ABC10,000Type 1Mike
DEF5,000Type 3Fred
DEF5,000Type 3Allan
MNO20,000Type 8Robert
MNO20,000Type 8Gina
PQR5,000Type 2Peter
VWX1,000Type 5Charlie
 
Sum first value for unique data

So, the correct sum for total number of members across all organizations in this sample table is 41,000
Take for example that your data will start in the A1 (there is a header in the first row)

In cell F2 placed next ARRAY formula and copy down. This formula create list of unique company
Code:
=IFERROR(INDEX($A$2:$A$10,MATCH(0,COUNTIF($F$1:F1,$A$2:$A$10),0)),"")
In cell G2 placed the following formula and copy down. This formula return first value for unique data
Code:
=IFERROR(VLOOKUP(F2,$A$2:$B$10,2,FALSE),"")
In cell G11 placed the following formula
Code:
=SUM(G2:G10)

OrganizationMembersTypeContact-UniqueMembers
ABC10000 Type 1JohnABC10000
ABC10000 Type 1BethDEF5000
ABC10000 Type 1MikeMNO20000
DEF5000 Type 3FredPQR5000
DEF5000 Type 3AllanVWX1000
MNO20000 Type 8Robert
MNO20000 Type 8Gina
PQR5000 Type 2Peter
VWX1000 Type 5Charlie
41000

I hope it helped
 
Last edited:
Thank you, I just found an easier way:


=SUMPRODUCT(1/COUNTIF(A2:A10,A2:A10)*(B2:B10))
 
Back
Top