# Macro for calculation of multiple averages based on cell content

#### simontop

##### New Member
Long title but I didn't know how to express it better.

I have a table that contains:
-Employee names in column 1
-Date of performance in column 2
-Result (numerical) of performance in column 3

I need an output that contains:
-one row for each employee
-one column for each month
-average of performance for the employee/month combination in the cells

I would try to solve it like this:
-read employee (X)/month(Y) for the cell in the output table
-loop through all values in column 3
-add to variable A if employee is X and Month is Y
-increase counter (variable B) by 1 for each addition
-calculate average from variables A and B

I don't know if this is practical or too complicated. I don't know yet how to achieve this (I'm working on it).

Any help is greatly appreciated.

### Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Replies
0
Views
152
Replies
3
Views
433
Replies
6
Views
278
Replies
1
Views
123
Replies
5
Views
265

1,195,667
Messages
6,011,053
Members
441,580
Latest member
BornholmerBjarne

### 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.

### Which adblocker are you using?

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

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