Average Function from a list

Infine

Board Regular
Joined
Oct 16, 2019
Messages
93
Office Version
  1. 365
Platform
  1. Windows
Hello,

So this might be very easy, it is just that I do not know the function;

Column A:
Names

Column B:
Numbers


How do I take the average for each without making a pivot table etc? The table looks like this:


Name1 2
Name2 3
Name3 5
Name44 6
Name2 6
Name3 5
Name3 2
Name32 1
etc...

So I want it to sum All "NameX" which is the same and take the average of it and outcome shall be:

Name1 2
Name2 (3+6)/2
Name3 (5+5+2)/3


Anyone knows the function?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I do not want to type "Name1" manually. How exactly should the function looks like? So I think something of FREQUENCY and SUM coulmn B which name is equal...

However, the NAMES are not static. They change so I want it to be dynamic..
 
Upvote 0
I have solved it by doing:

Take all names, copy, paste in new Column. Remove all doublets. Then AverageIF which match it. However, I want the first step be included in the code and be dynamic...
 
Upvote 0
Take all names, copy, paste in new Column. Remove all doublets. Then AverageIF which match it. However, I want the first step be included in the code and be dynamic...
Try using the Macro Recorder and record yourself doing this to get a lot of the code that you need.
If you need help cleaning it up afterwards, post what you have and we can help you with that.
 
Upvote 0
I don't want a makro.. I want a function which looks like "=UNIQUE", However, my Excel version from work does not include this function. At the moment I did it manually but it is in a Static. I wish I could have it dynamic which updates the numbers everyday as the names adds.
 
Upvote 0
How about
+Fluff 1.xlsm
ABCDEF
1NamesNumbers
2Eden1Eden4
3High Peak2High Peak2.5
4High Peak3Bradford12
5Bradford4Staffordshire Moorlands5
6Staffordshire Moorlands5West Somerset6
7West Somerset6Shropshire8
8Eden7County Durham12.5
9Shropshire8Calderdale10
10County Durham9Northumberland11
11Calderdale10Rossendale15.5
12Northumberland11Oldham13
13Rossendale12Derbyshire Dales14
14Oldham13Kirklees18
15Derbyshire Dales14  
16Bradford15  
17County Durham16  
18Bradford17
19Kirklees18
20Rossendale19
21
22
Result
Cell Formulas
RangeFormula
E2:E17E2=IFERROR(INDEX($A$2:$A$100,AGGREGATE(15,6,(ROW($A$2:$A$100)-ROW($A$2)+1)/(ISNA(MATCH($A$2:$A$100,E$1:E1,0)))/($A$2:$A$100<>""),1)),"")
F2:F17F2=IF(E2="","",AVERAGEIF(A:A,E2,B:B))
 
Upvote 0
I don't want a makro.
OK, your choice of words through me for a loop there.
However, I want the first step be included in the code and be dynamic...
To an Excel programmer, the word "code" implies VBA/Macros.
You wouldn't use the word "code" to describe Excel formulas.

In any event, it looks like Fluff gave you a formulaic solution that hopefully works for you.
 
Upvote 0

Forum statistics

Threads
1,215,676
Messages
6,126,159
Members
449,295
Latest member
DSBerry

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top