Forum Discussion
Kurt Turley
Feb 16, 2018Copper Contributor
How do I reference a range of cells using a function?
I am trying to use a formula where a function will return a cell reference to then use in another function of the same cell. The formula that I am trying to use is =average(vlookup(K9,A:B,2,false):v...
JKPieterse
Feb 16, 2018Silver Contributor
Check out the AVERAGEIFS function. Suppose your min and max dates are in F1 and F2:
=AVERAGEIFS($B$2:$B$100,$A$2:$A$100,"<="&$F$1,$A$2:$A$100,">="&$F$2)
=AVERAGEIFS($B$2:$B$100,$A$2:$A$100,"<="&$F$1,$A$2:$A$100,">="&$F$2)
Kurt Turley
Feb 16, 2018Copper Contributor
Thank you. I just had to switch the lesser than/equal and greater than/equal symbols and it worked.