View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default If/Then calculate the average

Hi Lynn

I can't see whay that array formula wouldn't work, unless there is
something wrong with the data.

You could try
=SUMPRODUCT(--(A2:A399="MUSIC"),--(I2:I339))/COUNTIF(A2:A339,"MUSIC")


--
Regards

Roger Govier

LynnJ wrote
I'm trying to find a formula that will calculate the average number
of days it takes for a certain type of material to move through my
department. Where column A is the type of material on a book truck
and column I is the number of days it took for that book truck to
move through the department. If the cells in column A= MUSIC then
average the cells of the same row in column I.
I've been playing with the SUMIF and AVERAGE functions but haven't
been able to figure it out.
It didn't like =AVERAGE(IF(A2:A399,"MUSIC",I2:I399)) as an array
formula. Any help is greatly appreciated.