Find all instances of a name, then return sum of values

HelloAce

New Member
Joined
Apr 26, 2018
Messages
14
Hi,

I have a workbook with thousands of unique names in column 'J'.
The other columns also contain these same names, often repeated many times over, with a different number value alongside each name.
The numbers are one space to the left of the names.

For instance John Jones may have a value 24 next to his name in S7 (which would be in R7), a 11 value next to his name in AB12, and a 35 value next to his name in ZZ55.
I am looking for a formula to find and add up the numbers that correspond to each name from column J. I would like the formula alongside the names in column 'J' that finds each of these instances, and then returns, in this instance, a value of 70 next to John Jones' name in column 'J'.

Is this possible?
Thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Book1
ABCDEF
126John93Lisa96Robert
259Jennifer98Robert37Jennifer
329Laura12Sandra36John
450Robert89Helen3Lisa
52Michael33Jennifer32Michael
6
7Name:Michael
8Numbers:2
932
Sheet1


Array formula in cell C8:
=SMALL(IF($C$7=$B$1:$F$5,$A$1:$E$5,""),ROWS($A$1:A1))
 
Upvote 0
Hi,

use SUMIFS, in say K2 =SUMIFS(R2:R500,S2:S500,J2) and same for all columns
R2:R500 is range with numbers (adjust the range)
S2:S500 is range with names (adjust the range)

Column J is with unique names
 
Upvote 0
Hi, thank you for your response!
I was hoping the formula would add up all the numerical totals for each instance of each name (outside of column 'J'). In the example you have given here, the formula I'm hoping for would return a value of 34 for Michael. Then the next formula would return a value of 244 for Robert, etc. So essentially it is finding each instance of the name (eg Michael) and finding its offset value (one cell to the left of each instance of the name), then adding the totals together.
The formula would be put alongside each name listed in my 'J' column so I can quickly see the totals for each name throughout the entire workbook.
Thanks
 
Upvote 0
ABCDEF
JohnLisaRobert
JenniferRobertJennifer
LauraSandraJohn
RobertHelenLisa
MichaelJenniferMichael
Name:Michael
Numbers:

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]26[/TD]

[TD="align: right"]93[/TD]

[TD="align: right"]96[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]59[/TD]

[TD="align: right"]98[/TD]

[TD="align: right"]37[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]29[/TD]

[TD="align: right"]12[/TD]

[TD="align: right"]36[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]50[/TD]

[TD="align: right"]89[/TD]

[TD="align: right"]3[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]2[/TD]

[TD="align: right"]33[/TD]

[TD="align: right"]32[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]
[TD="align: right"][/TD]

[TD="align: right"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]32[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet1



Array formula in cell C8:
=SMALL(IF($C$7=$B$1:$F$5,$A$1:$E$5,""),ROWS($A$1:A1))

I was hoping the formula would add up all the numerical totals for each instance of each name (outside of column 'J'). In the example you have given here, the formula I'm hoping for would return a value of 34 for Michael. Then the next formula would return a value of 244 for Robert, etc. So essentially it is finding each instance of the name (eg Michael) and finding its offset value (one cell to the left of each instance of the name), then adding the totals together.
The formula would be put alongside each name listed in my 'J' column so I can quickly see the totals for each name throughout the entire workbook.
Thanks
 
Upvote 0
Hi,

use SUMIFS, in say K2 =SUMIFS(R2:R500,S2:S500,J2) and same for all columns
R2:R500 is range with numbers (adjust the range)
S2:S500 is range with names (adjust the range)

Column J is with unique names

Hi, thank you for your response!

I have the names spread out over many different columns, how can I modify this to cover the entire workbook? Is that possible?
I tried adjusting both ranges with the entire workbook range (L2:YU170) but it returned a result of 0.

Thanks
 
Upvote 0
=SUMIFS(R2:R500,S2:S500,J2)

Look at the cell references, they don't match.

Your formula should be:
=SUMIFS(L2:YU170,M2:YV170,J2)

or possibly

=SUMIFS(K2:YT170, L2:YU170)


Hi, thank you for your response!

I have the names spread out over many different columns, how can I modify this to cover the entire workbook? Is that possible?
I tried adjusting both ranges with the entire workbook range (L2:YU170) but it returned a result of 0.

Thanks
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top