sum data in column B based on values in column A

iggator2003

New Member
Joined
Nov 3, 2010
Messages
8
How can I sum data from column B based on the values in column A being the same?

Example:
Column A Column B Column C
George 1
George 2
George 2 5
Jeff 3
Jeff 1
Jeff 4 8

Column C is summing the values in column B based on the values in column A being the same.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Take a look at the SUMIF formula.
Excel's built-in help files have detailed descriptions and examples of how to use this function.
 
Upvote 0
Thanks, but the sumif or sumifs doesn't seem to be working. Isn't there a way to do an array formula to get what I'm looking for?
 
Upvote 0
SUMIF will work, you may just be having a problem with the formula.
If your data is in range A2:B7 (like in your example), place this formula in cell C2 and copy down for all rows:
=IF(A2<>A3,SUMIF(A$2:A$7,A2,B$2:B$7),"")

The IF part of it is just used to return nothing unless it is the last row for a name (so it only shows the total in the last row).

Other options include using Subtotals or Pivot Tables.
 
Upvote 0
Thanks, but the sumif or sumifs doesn't seem to be working. Isn't there a way to do an array formula to get what I'm looking for?
Based on your sample data, if an array formula will work then so should SUMIF.

Can you be more specific about what "doesn't seem to be working" means?

Are you getting some kind of error? Incorrect result?
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,289
Members
452,902
Latest member
Knuddeluff

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