SOLVED

Finding average of a VLOOKUP range

Copper Contributor

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?

2 Replies
best response confirmed by viccart (Copper Contributor)
Solution

@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.

finding average of range.JPG

 

Perfect thank you!
1 best response

Accepted Solutions
best response confirmed by viccart (Copper Contributor)
Solution

@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.

finding average of range.JPG

 

View solution in original post