Sum of cells whit the same name

M

Mark J

I have a table like this (original cotains a row a 4000 cells)



CAR NUMBER TOTAL
Mazda 1
Mazda 7
Mazda 8
Volvo 4
Volvo 5
Skoda 5
Skoda 4
Skoda 7


How do i get a sum of cells with the same name, so you get something
like this.

CAR NUMBER TOTAL
Mazda 1 16
Mazda 7
Mazda 8
Volvo 4 9
Volvo 5
Skoda 5 16
Skoda 4
Skoda 7
 
R

Ron Rosenfeld

I have a table like this (original cotains a row a 4000 cells)



CAR NUMBER TOTAL
Mazda 1
Mazda 7
Mazda 8
Volvo 4
Volvo 5
Skoda 5
Skoda 4
Skoda 7


How do i get a sum of cells with the same name, so you get something
like this.

CAR NUMBER TOTAL
Mazda 1 16
Mazda 7
Mazda 8
Volvo 4 9
Volvo 5
Skoda 5 16
Skoda 4
Skoda 7

To replicate your results, and this assumes that CAR is sorted as you show, and
the table is in A1:Cn. CAR and NUMBER are NAME'd ranges.

C2: =IF(A2<>A1,SUMIF(CAR,A2,NUMBER),"")

Copy/Drag down as far as needed.

You should also look at the

Data/Subtotals and Data/Pivot Table wizards for alternate methods of doing
this.

In particular, the Pivot Table will be of value if CAR is not a sorted list.


--ron
 
R

RagDyeR

Names in Column A,
Numbers in Column B,
Enter this in C1, and copy down as needed:

=IF(A1<>A2,SUMIF($A$1:A1,A1,$B$1:B1),"")

This places total at *end* of group !

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

message
I have a table like this (original cotains a row a 4000 cells)



CAR NUMBER TOTAL
Mazda 1
Mazda 7
Mazda 8
Volvo 4
Volvo 5
Skoda 5
Skoda 4
Skoda 7


How do i get a sum of cells with the same name, so you get something
like this.

CAR NUMBER TOTAL
Mazda 1 16
Mazda 7
Mazda 8
Volvo 4 9
Volvo 5
Skoda 5 16
Skoda 4
Skoda 7
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top