View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Averageif year=2000

This will work
=SUMPRODUCT(--(YEAR(A2:A900)=2000),B2:B900)/SUMPRODUCT(--(YEAR(A2:A900)=2000))

For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
Debra Dalgleish
http://www.contextures.com/xlFunctio...tml#SumProduct

best wishes
--
Bernard Liengme
http://people.stfx.ca/bliengme
Microsoft Excel MVP

"MitzDriver" wrote in message
...
In column A i have settledate "01/02/2000", thru todays date. In column B,
I
have the price "195600", etc.

A B
settledate price
3/1/2001 240000
6/30/2003 50000
11/9/2000 132700
6/30/2000 125000
6/30/2003 49700
5/12/2003 47000
6/12/2000 125000
12/18/2000 73200
4/24/2001 57000
3/2/2004 75500
2/28/2003 47000
3/1/2002 40000

I would like to use =averageif(a2:a900, year="2000",b2:b900)...however, it
is not working. Would someone be kind enought to put me on the right path.

Your help will be greatly appricated.