Need help with this reference problem

G

Guest

For this array formula,

=AVERAGE(SMALL(A1:A60,ROW(INDIRECT("1:10"))))

I'd like to modify it such that it will look up another cell (e.g. C5) for
the number of cells I want to average instead of a constant of 10.

I tried to change it to
=AVERAGE(SMALL(A1:A60,ROW(INDIRECT("1:N")))) and name the C5 cell "N" and
apparently it didn't work.

How should I fix it? Thx in advance.
 
F

Frank Kabel

Hi
try:
=AVERAGE(SMALL(A1:A60,ROW(INDIRECT("1:" & C5))))

or as alternative:
=AVERAGE(IF(A1:A60<=SMALL(A1:A60,C5)))
 
G

Guest

Thanks a lot ! Tried your first suggestion and it works, but the
alternative doesn't though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top