Forum Discussion

viccart's avatar
viccart
Copper Contributor
Jan 23, 2023
Solved

Finding average of a VLOOKUP range

I am trying to create a formula to average the range of a vlookup. So in the below example the Price should reflect an average between the Start Date and the End Date, which should update as those dates change. 

 

I tried the following formula which did not work:

=AVERAGE((VLOOKUP(A1:B10,E2,2)):(VLOOKUP(A1:B10,E3,2)))

 

01-Jan	3000			
02-Jan	4000		Start Date	03-Jan
03-Jan	5000		End Date	07-Jan
04-Jan	6000			
05-Jan	7000		Price	
06-Jan	8000			
07-Jan	9000			
08-Jan	10000			
09-Jan	11000			
10-Jan	12000			

 

Any thoughts?

  • viccart 

    =AVERAGE(INDEX($B$1:$B$10,MATCH($E$2,$A$1:$A$10,0)):INDEX($B$1:$B$10,MATCH($E$3,$A$1:$A$10,0)))

    You can try this formula.

     

  • viccart 

    =AVERAGE(INDEX($B$1:$B$10,MATCH($E$2,$A$1:$A$10,0)):INDEX($B$1:$B$10,MATCH($E$3,$A$1:$A$10,0)))

    You can try this formula.

     

Resources