Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

3/13/2015 excel 

­ How to SUM parts of a column which have same text value in different column in the same row ­ Stack Overflow
 

 
 
 
 
sign up log in tour help  stack overflow careers

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no
Take the 2­minute tour   ×
registration required.

How to SUM parts of a column which have same text value in different column in the same
row

I've found similar question, but I still don't get it. Here's the thing. I have a column with names and a column with numbers.

FirstName    Name    Number
John         Smith     17
John         Smith     26
Peter        Smith     116
Peter        Smith     25
Franck       Black     17
Luke        Peterson   17
Luke        Peterson   37

Now, those names with same  FirstName  and  Name  represent the same guys. I need to sum the numbers associated with them. I prefer


not to use VBA. 
Thanks for help.

excel   sum   row

edited Oct 29 '13 at 22:14 asked Oct 29 '13 at 21:46
Jaycal user2285265
1,271 1 3 14 3 1 1 3

4 Answers

If your data has the names grouped as shown then you can use this formula in D2 copied down
to get a total against the last entry for each name

=IF((A2=A3)*(B2=B3),"",SUM(C$2:C2)‐SUM(D$1:D1))

See screenshot

answered Oct 29 '13 at 22:51
barry houdini
26.1k 2 15 28

http://stackoverflow.com/questions/19669814/how­to­sum­parts­of­a­column­which­have­same­text­value­in­different­column­in­t 1/2
3/13/2015 excel ­ How to SUM parts of a column which have same text value in different column in the same row ­ Stack Overflow

A PivotTable might suit, though I am not quite certain of the layout of your data:

The bold numbers (one of each pair of duplicates) need not be shown as the field does not have
to be subtotalled eg:

answered Oct 29 '13 at 22:01
pnuts
21.4k 4 20 41

Take a look at Pivot Tables. Here is a screenshot of Excel 2013 using Pivot Tables to do what
you're describing. Here is a screenshot of your data as an example...

http://imgur.com/FEdW1y6

answered Oct 29 '13 at 22:13
IntStarFoo
482 3 10

This can be done with an array formula as well, i.e. pressing  Ctrl  +  Enter  after entering the


formula below and before pressing enter. Update the ranges as you see fit

=SUM($C$2:$C$7*($A$2:$A$7=A2)*($B$2:$B$7=B2))

A2:A7 = First name range

B2:B7 = Last Name Range

C2:C7 = Numbers Range

This will find all the names with the same first and last name and sum the numbers in your
numbers column

answered Oct 29 '13 at 22:06
Jaycal
1,271 1 3 14

http://stackoverflow.com/questions/19669814/how­to­sum­parts­of­a­column­which­have­same­text­value­in­different­column­in­t 2/2

You might also like