ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   AVG_IF with YTD array - too many arguements (https://www.excelbanter.com/excel-discussion-misc-queries/242706-avg_if-ytd-array-too-many-arguements.html)

Vulcan[_2_]

AVG_IF with YTD array - too many arguements
 
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."

barry houdini[_29_]

AVG_IF with YTD array - too many arguements
 

Try

=AVERAGE(OFFSET(B3:B10,0,0,,MATCH(A1,B2:M2,0)))

I'm assuming that A1 just shows the month as text e.g. "Sep"


--
barry houdini
------------------------------------------------------------------------
barry houdini's Profile: http://www.thecodecage.com/forumz/member.php?userid=72
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=134991


alexrs2k

AVG_IF with YTD array - too many arguements
 
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.
--
Alex
*Remember to click "yes" if this post helped you. Thank you!



"Vulcan" wrote:

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."



All times are GMT +1. The time now is 08:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com