Forum Discussion
viljamil
Apr 12, 2023Copper Contributor
Finding the right function
Hi, I would need help finding the right function. If I have several names that are repeated many times, and there is a number after all of them, how could I combine these so that the name is repe...
NikolinoDE
Apr 12, 2023Platinum Contributor
As far as I could gather from the text, you could use two possible methods for this.
Using a pivot table:
- Open a new spreadsheet in Excel.
- Enter your data into the spreadsheet with one column for names and one column for numbers.
- Select all the data you entered.
- Click on the “Insert” tab and select “Pivot Table”.
- In the pivot table editor, select the name column as your “Rows” and the number column as your “Values”. Make sure to select “Sum” as the aggregation function for the number column.
- The pivot table will now display each unique name once with the sum of all the numbers associated with that name.
Using a formula:
- Open a new spreadsheet in Excel.
- Enter your data into the spreadsheet with one column for names and one column for numbers.
- In a new column, enter each unique name once.
- In the cell next to the first unique name, enter the formula =SUMIF(range, criteria, sum_range), where range is the range of cells containing the names, criteria is the cell containing the unique name, and sum_range is the range of cells containing the numbers. For example, if your names are in column A and your numbers are in column B, and your first unique name is in cell D2, you would enter =SUMIF(A:A,D2,B:B) in cell E2.
- Drag the formula down to fill in the rest of the cells next to each unique name.
Both methods will give you a list of each unique name with the sum of all the numbers associated with that name.
If this is not what you are looking for, please include the following info to help others answer your question (click on link):
Welcome to your Excel discussion space!
I hope this helps!
I know I don't know anything (Socrates)