Merge cells with same value

Copper Contributor

Hello, 

I am trying to merge cells with same value.

I have got data like this

A....5

A....3

B...2

B....3

C...1

 

and I want to get 

 

A...8

B...5

C...1

 

Can you please help?

3 Replies

@Method_Coffee 

One option would be to create a pivot table based on the data.

Another option: let's say the data are in A1:B5.

In D1, enter the formula =UNIQUE(A1:A5)

In E1, enter the formula =SUMIF(A1:A5,D1#,B1:B5)

@Method_Coffee 

Perhaps a Pivot Table will do that, provided that the data is similar to what you can see in the attached file.

 

@Method_Coffee 

=LEFT(A1,1)&"…"&SUMPRODUCT((LEFT($A$1:$A$5,1)=LEFT(A1,1))*RIGHT($A$1:$A$5,1))

An alternative could be this formula. Then copy the result of the formula and paste only values into range D1:D5. Then apply data -> remove duplicates.

sum unique.JPG