Hi
I have a table with various percentages, and I would like a formula to have an average of these. Please see attached file to get more of an idea.
Thanks
G
Hi
I have a table with various percentages, and I would like a formula to have an average of these. Please see attached file to get more of an idea.
Thanks
G
Perhaps:
I3: =IF(COUNT(C3:H3),AVERAGE(C3:H3),"")
copied down
from that I think you can work out / adapt the above for the Row average ?
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
IF u want to exclude zeros so u can use an array formula like
=IFERROR(AVERAGE(IF((C3:H3<>"")*(C3:H3<>0),C3:H3)),"")
in I3, confirm w/ctrl+shift+enter and copy it down
Люди, питающие благие намерения, как раз и становятся чудовищами.
Regards, ?Born in USSR?
Vusal M Dadashev
Baku, Azerbaijan
No need for Array if using 2007 functions as implied by use of IFERROR - just use AVERAGEIF
=AVERAGEIF(C3:H3,"<>0",C3:H3)
whoops....
![]()
the only problem wth these formulas are that they dont include how many runs there have been, so it is not giving me the answer correctly. for example in I5 there were 3 runs. in the fast column the result was 0/2 which made 0%, and in the firm column the result was 1/1, which made 100%. so in total it was 1/3, which would be 33.33%, but it comes up 100%.
i realise it may not be possible to do, just thought i would ask. thanks for help so far.
G
Might be a clever way of doing it that I can't think of right now, failing that a UDF could do it:
inserted into a module (ensure Macros enabled) and then called from a cell![]()
Function AverageAvg(rngAvg As Range) As Variant Dim rngcell As Range, vSplit As Variant, dblX As Double, dblY As Double For Each rngcell In rngAvg.Cells If InStr(rngcell.Formula, "/") Then vSplit = Split(Replace(rngcell.Formula, "=", ""), "/") dblX = dblX + vSplit(0) dblY = dblY + vSplit(1) End If Next rngcell If dblY Then AverageAvg = dblX / dblY Else AverageAvg = "n/a" End Function
I3: =AVERAGEAVG(C3:H3)
copied down
that worked, genius!
thanks so much. my chats should be completed now, with a bit of luck, unless i decide to change them again lol
thanks again
G
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks