Hi, I am using the INDEX, MATCH combination with a number of criteria, but am receiving an incorrect result.
In plain english, here is what I am trying to do.
The formula is entered into "Sheet2" column D.
The value I wish to return is an average of "Sheet1" column Q.
Based on the following criteria:
a) The value in "Sheet2" column A, is found in "Sheet1" column L
b) The value in "Sheet2" column B, is found in "Sheet1" column M
c) The value in "Sheet1" column H, is one of the 5 highest values in that column
I've tried a number of variations without success, but here is the latest formula used:
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'; color: #000000}span.s1 {color: #006107}span.s2 {color: #ab30d6}span.s3 {color: #a54a29}span.s4 {color: #0057d6}span.s5 {color: #33af4a}span.s6 {color: #ff9c1b}</style>{=AVERAGE(INDEX('Sheet1'!Q:Q,MATCH(1,('Sheet1'!L:L='Sheet2'!A:A)*('Sheet1'!M:M1='Sheet2'!B:B)*(('Sheet1'!H:H>=MAX('Sheet1'!H:H)-5)),0)))}
This returns an answer of '48'.
'48' is the first value in "Sheet1" column Q that meets the three criteria (a, b, c). However, it is not the average. The average should be 40.2 =(48+49+35+45+24)/5.
There are many more values than those in column Q. But those are the 5 that meet the three criteria.
Any help is much appreciated!
In plain english, here is what I am trying to do.
The formula is entered into "Sheet2" column D.
The value I wish to return is an average of "Sheet1" column Q.
Based on the following criteria:
a) The value in "Sheet2" column A, is found in "Sheet1" column L
b) The value in "Sheet2" column B, is found in "Sheet1" column M
c) The value in "Sheet1" column H, is one of the 5 highest values in that column
I've tried a number of variations without success, but here is the latest formula used:
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'; color: #000000}span.s1 {color: #006107}span.s2 {color: #ab30d6}span.s3 {color: #a54a29}span.s4 {color: #0057d6}span.s5 {color: #33af4a}span.s6 {color: #ff9c1b}</style>{=AVERAGE(INDEX('Sheet1'!Q:Q,MATCH(1,('Sheet1'!L:L='Sheet2'!A:A)*('Sheet1'!M:M1='Sheet2'!B:B)*(('Sheet1'!H:H>=MAX('Sheet1'!H:H)-5)),0)))}
This returns an answer of '48'.
'48' is the first value in "Sheet1" column Q that meets the three criteria (a, b, c). However, it is not the average. The average should be 40.2 =(48+49+35+45+24)/5.
There are many more values than those in column Q. But those are the 5 that meet the three criteria.
Any help is much appreciated!