AVG_IF with YTD array - too many arguements

V

Vulcan

A1 (current month), B2:M2 (Jan - Dec), B3:M10 (data).

I want to change the month in A1 to get an YTD average. If I use an
{AVG(if,(if,(if,(if))))} array I get a "too many arguments error."
 
A

alexrs2k

Hi.
Try this formula:
=ROUND(SUMPRODUCT(--(MONTH(B1:M1)<=MONTH(A1)),(B2:M2)/MONTH(A1)),2)

The cells containing the series of months should be formated as Date and
should have valid Date. If you want to show the month in letters go to Cell-
Format -Custom and type mmm for the first 3 letters.
 

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

Similar Threads


Top