reverse lookup + array

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I want to ask user to enter date then excel will return the average of temp1 and temp2 (reverse look up + array). My formula is this

=AVERAGE(INDEX(A2:C7,MATCH(F1,C2:C7,0),{1,2}))

(ctr+shift+enter)

but for the date 4/22/16 , excel returned 35 ! I was expecting (35+33)/2 instead. So excel is returning the first value only! Any idea why. Thank you so much.


[TABLE="class: grid, width: 448"]
<colgroup><col width="64" span="7" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]temp1[/TD]
[TD="width: 64"]temp2[/TD]
[TD="width: 64"]date[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"]enter date[/TD]
[TD="width: 64, align: right"]4/22/16[/TD]
[TD="width: 64, align: right"]35[/TD]
[/TR]
[TR]
[TD="align: right"]35[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]4/22/16[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]9/10/15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]1/20/17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]33[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]2/12/15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]3/28/15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]30[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]12/21/15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Try

=AVERAGE(INDEX(A2:B7,MATCH(F1,C2:C7,0),0))

By putting 0 in the column augment of index you tell it to return all columns, you also do not want to include the date in the array.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top