stanley_manley
stanley_manley

Reputation: 314

Column 1 with names and Column 2 with values

Let's say I have a Text document. There are two columns. Column 1 contains a list of names while column contains a list of value relating to those names. The problem is column 1 may have same names repeating on different rows. This is not an error though.

For ex:

Frank Burton 13
Joe Donnigan 22
John Smith   45
Cooper White 53
Joe Donnigan 19

What are the ways to organize my data in a way that I would have column 1 with unique data names and column 2 with the values summed together relating column 1? What can I do if I have these data in excel?

For ex:

Frank Burton 13
Joe Donnigan 41
John Smith   45
Cooper White 53

Thanks a bunch!

Upvotes: 2

Views: 145

Answers (1)

xQbert
xQbert

Reputation: 35333

In mySQL you could write a query similar to...

Select col1, Sum(col2) FROM TableName group by col1

In Excel you could use a pivot table to group the information together Insert Pivot table, select range enter values as in image below.

enter image description here

Upvotes: 3

Related Questions