# Thread: efficient way to sum numbers of repeated rows? Thanks:  2 Post #5323619 (1)Post #5323621 (1) Likes: 0

1. ## efficient way to sum numbers of repeated rows?

hey guys, basically the title said it all. I have one excel file, that contains the sum of lots of files, they were all the same format, rows and columns, but with different values,it's cool that with a macro I have been able to put them all in the same sheet, but I don't know where can I go from there. Is there any trick to simplify all that information? I have search a lot, but I didn't find a way to merge those columns and sum the numbers.

2. ## Re: efficient way to sum numbers of repeated rows?

something like this?

 NAME Points In Certain Category Sum JACK 173 MIKE 87 LENNON 74 PAUL 82 ROD 61 TOTAL 72

3. ## Re: efficient way to sum numbers of repeated rows?

Originally Posted by trati0n
but I didn't find a way to merge those columns and sum the numbers.
What are you looking for a a final answer? Can you show us the output you would want for the example you posted (using the numbers you posted so we can see what you added and where it ended up)?

4. ## Re: efficient way to sum numbers of repeated rows?

thanks for taking the time to read and answer guys, sorry if I wasn't clear enough. And I have to add, that the total was wrong, it should be the sum of all the column. But the idea is this,to get the sum in just one of this, instead of various (as shown in my original message)

5. ## Re: efficient way to sum numbers of repeated rows?

show expected result in a table form not a picture

6. ## Re: efficient way to sum numbers of repeated rows?

maybe

 NAME Points in certain Category SUM JACK 82 MIKE 51 LENNON 38 PAUL 47 ROD 29 TOTAL 247

Code:
```
// Query1
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Group = Table.Group(Table.UnpivotOtherColumns(Source, {"NAME"}, "Attribute", "Value"), {"NAME"}, {{"Points in certain Category SUM", each List.Sum([Value]), type number}})
in
Group```
and this is NOT vba but M-code and PowerQuery

next time show proper source data AND expected result in a table form (not a picture)
I don't want to waste my time