Create AVGIF function

P

plindsay

Does anyone know how to create an average if function similiar to a SUMIF
function? I'm not that familiar with VBE so I believe this is out of my
league. Any advice would be helpful.

Regards
 
M

Max

Assume you have numbers in A1:A10,
and certain cells marked as "X" within B1:B10

We could try in say, C1, array-entered
(i.e press CTRL+SHIFT+ENTER):

=AVERAGE(IF(B1:B10="X",A1:A10))

which will evaluate the average of only those numbers in col A
corresponding to the "x" marked in col B
 
Top