Hope somebody can quickly aid me on this one. Having a memory blank.
Please see attached example.
I wish to calculate the AVERAGE of a list of 'VALUE' of each 'TYPE'
e.g. IF 'TYPE' = 'A', then AVERAGE 'VALUE' = n
So I need to combine the above statement in one cell to apply in the example I've given.
Thanks,
Ben.
Try:
=SUMIF($A$2:$A$17,D2,$B$2:$B$17)/COUNTIF($A$2:$A$17,D2)
where D2 contains just A or B or C...
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Thanks for the ultra-quick response. I had forgotten that there is an 'AVERAGEIF' function that works in exactly the same manner as 'SUMIF'.
Is there also a 'MAXIF' function to find the 'MAX' of a range of values to work in the same fashion?
By your profile and attachment, I figured you were not using 2003, so that is why I did not mention AVERAGEIF.
There is no MAXIF function, however...
You would need an array formula:
=MAX(IF($A$2:$A$17=D2,$B$2:$B$17))
confirmed with CTRL+SHIFT+ENTER not just ENTER
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Genius! Thanks for that.
Why does the confirmation of CTRL+SHIFT+ENTER come into play on this when a normal 'ENTER' doesn't confirm the function?
Ben.
Because it is considered an Array formula.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks