Commander Vimes
New Member
- Joined
- Aug 8, 2016
- Messages
- 11
So i've been struggling with this. Is there a way to calculate the median of a set of values based on Name and volume? An example of the data layout is below, what i want is to calculate the median value for a large table with multiple entries using formula or VBA.
<tbody>
</tbody>
Using the example above i would want to calculate the median for Dog, Cat and Duck.
Using Cat as an example, the figures there would be 1 x Cat=2 and 2 xCat=3.6.
Median would be 3.6: (2, 3.6, 3.6)
So is there a formula or macro Vba which would look at the Name and volume and then calculate the Mean of the value for each unique Name?
-CV
Name | Volume | Value |
Dog | 1 | 5 |
Dog | 1 | 2.5 |
Dog | 3 | 3 |
Cat | 1 | 2 |
Cat | 2 | 3.6 |
Duck | 5 | 5 |
<tbody>
</tbody>
Using the example above i would want to calculate the median for Dog, Cat and Duck.
Using Cat as an example, the figures there would be 1 x Cat=2 and 2 xCat=3.6.
Median would be 3.6: (2, 3.6, 3.6)
So is there a formula or macro Vba which would look at the Name and volume and then calculate the Mean of the value for each unique Name?
-CV