Get Name From Array Using Sumif Formula

steezytrees

New Member
Joined
Jun 18, 2012
Messages
6
Hi, I have done a bunch of searching but just can't really figure out how to phrase what I am looking for, so hopefully someone here can help me out.

I have an array that has a bunch of names with dollar values of an account of theirs next to them. People have multiple accounts and come up on separate rows with the same name, but different values. I am trying to sum up the dollar values per person, which I have done with a sumif formula on a separate sheet. This works fine, but I cannot figure out how to then display next to the summed number, the person's name, and additionally have it aggregated to just one output per name. I need to be able to sort the original list and have the output remain the same.

Here's an example to help explain. If this is my data table:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name
[/TD]
[TD]Value
[/TD]
[/TR]
[TR]
[TD]John
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]John
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]John
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]Bob
[/TD]
[TD]4
[/TD]
[/TR]
[TR]
[TD]Bob
[/TD]
[TD]5
[/TD]
[/TR]
</tbody>[/TABLE]

My output table using =SUMIF($A$2:$A$6,A2,$B$2:$B$6)is then:

[TABLE="width: 500"]
<tbody>[TR]
[TD]6
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[/TR]
</tbody>[/TABLE]

And what I need is:

[TABLE="width: 500"]
<tbody>[TR]
[TD]John
[/TD]
[TD]6
[/TD]
[/TR]
[TR]
[TD]Bob
[/TD]
[TD]9
[/TD]
[/TR]
</tbody>[/TABLE]

Thanks so much in advance!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi, I have done a bunch of searching but just can't really figure out how to phrase what I am looking for, so hopefully someone here can help me out.

I have an array that has a bunch of names with dollar values of an account of theirs next to them. People have multiple accounts and come up on separate rows with the same name, but different values. I am trying to sum up the dollar values per person, which I have done with a sumif formula on a separate sheet. This works fine, but I cannot figure out how to then display next to the summed number, the person's name, and additionally have it aggregated to just one output per name. I need to be able to sort the original list and have the output remain the same.

Here's an example to help explain. If this is my data table:

[TABLE="width: 500"]
<TBODY>[TR]
[TD]Name
[/TD]
[TD]Value
[/TD]
[/TR]
[TR]
[TD]John
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]John
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]John
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]Bob
[/TD]
[TD]4
[/TD]
[/TR]
[TR]
[TD]Bob
[/TD]
[TD]5
[/TD]
[/TR]
</TBODY>[/TABLE]

My output table using =SUMIF($A$2:$A$6,A2,$B$2:$B$6)is then:

[TABLE="width: 500"]
<TBODY>[TR]
[TD]6
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[/TR]
</TBODY>[/TABLE]

And what I need is:

[TABLE="width: 500"]
<TBODY>[TR]
[TD]John
[/TD]
[TD]6
[/TD]
[/TR]
[TR]
[TD]Bob
[/TD]
[TD]9
[/TD]
[/TR]
</TBODY>[/TABLE]

Thanks so much in advance!
You're doing it backwards.

You should first get the list of unique names and then apply the SUMIF formula to the names.

The easiest way to get the unique names is by using advanced filter. See this...

http://contextures.com/xladvfilter01.html#FilterUR
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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