excel - Average of top 10 values in a row, treating empty cells as ones -
suppose have row in excel consisting of n
cells (in fact n=12
). of these cells have numerical values, may empty. want find average of top m
cells in row (in fact m=10
), treating empty cells if contained 1s.
(the context want compute average grades of students homework grade, , formula used in course. empty cells correspond homeworks not handed in, keep distinction between homeworks graded 1 , missing.)
based on data in a1:l1
, array formula**:
=average(large(if(isnumber(a1:l1),a1:l1,1),{1,2,3,4,5,6,7,8,9,10}))
regards
**array formulas not entered in same way 'standard' formulas. instead of pressing enter, first hold down ctrl , shift, , press enter. if you've done correctly, you'll notice excel puts curly brackets {} around formula (though not attempt manually insert these yourself).
Comments
Post a Comment