excel formula - Average a range of values if the date associated with it falls within a date range -


i'm trying average range of values if associated date falls between 2 specified dates. following function works:

averageifs($1:$1,$2:$2,">=1/1/2014",$2:$2,"<=1/2/2014")

...in case values want average in row 1 , dates associated in row 2.

however, in case i'm explicitly stating date range in formula (">=1/1/2014" , "<=1/2/2014"). there way create similar formula allows me reference date cells determine date range instead of having explicitly state dates in formula itself???

you can use following, putting start date , end date in cell , refer them in formula:

=averageifs($1:$1,$2:$2,">="&$b$4,$2:$2,"<="&$b$5) 

with following example:
enter image description here


Comments

Popular posts from this blog

python - Mongodb How to add addtional information when aggregating? -

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

java - Incorrect order of records in M-M relationship in hibernate -