I have a list in Excel with basically two columns: Date and Value.
Col A |Col B |Col C|Col D |Col E
----------+------+-----+----------+-----
Date |Value | |Date-range|
2012/01/01| 10| |2012/01/01| 8.33
2012/01/05| 5| |2012/01/07|
2012/01/07| 10| | |
2012/01/13| 1| | |
I want to return the Average between two dates which I would set in two separate cells. Is that possible?
So let’s say in Cell D1 I put “2012/01/01” and in Cell D2 I put “2012/01/07”. It should return the average of the values in that date range, in this case (10+5+10)/3 = 8.33
I was able to return the cell (e.g. C100) for both dates but I don’t know how to include them in a range for an average. Or is there an even smarter way to do it?
As you have Excel 2007 you can use
AVERAGEIFS. For your case=AVERAGEIFS(B1:B10,A1:A10,">="&D1,A1:A10,"<="&D2)Where D1 is your minimum date, D2 your maximum date and A1:B10 contains your date and values ranges will return 8.33