Hi guys,
I'm trying to find the average result within a percentile. This is the formula I have for that:
=IFERROR(AVERAGE(IF('1b. Import Morningstar Data'!$AF2:$HL2<PERCENTILE('1b. Import Morningstar Data'!$AF2:$HL2,0.001),'1b. Import Morningstar Data'!$AF2:$HL2))/100,"")
It works perfectly fine on its own. However I would like to replace the 3 "$AF2:$HL2" portions of it with some kind of OFFSET MATCH MATCH type function to find the arrays to compute it from instead of a fixed row numbers.
I came up with the following (that portion doesn't work):
=OFFSET('1b. Import Morningstar Data'!$A$1,MATCH(A3,'1b. Import Morningstar Data'!$A:$A,0),MATCH('1b. Import Morningstar Data'!AF1,'1b. Import Morningstar Data'!1:1,0),,COUNT('1b. Import Morningstar Data'!AF1:HL1))
The combined function as of right now looks like this (Obviously also doesn't work):
=IFERROR(AVERAGE(IF(OFFSET('1b. Import Morningstar Data'!$A$1,MATCH(A3,'1b. Import Morningstar Data'!$A:$A,0),MATCH('1b. Import Morningstar Data'!AF1,'1b. Import Morningstar Data'!$1:$1,0),,COUNTA('1b. Import Morningstar Data'!$AF$1:$HL$1))<PERCENTILE(OFFSET('1b. Import Morningstar Data'!$A$1,MATCH(A3,'1b. Import Morningstar Data'!$A:$A,0),MATCH('1b. Import Morningstar Data'!AF1,'1b. Import Morningstar Data'!$1:$1,0),,COUNTA('1b. Import Morningstar Data'!$AF$1:$HL$1)),0.001),OFFSET('1b. Import Morningstar Data'!$A$1,MATCH(A3,'1b. Import Morningstar Data'!$A:$A,0),MATCH('1b. Import Morningstar Data'!AF1,'1b. Import Morningstar Data'!$1:$1,0),,COUNTA('1b. Import Morningstar Data'!$AF$1:$HL$1))))/100,"")
I know that last one is a big formula and it's hard to figure out where the error is but if you could manage. It would be SOOOOOOOOOO appreciated.
Thank you so much in advance for taking the time to figure out this problem with me.
Gabriel
I'm trying to find the average result within a percentile. This is the formula I have for that:
=IFERROR(AVERAGE(IF('1b. Import Morningstar Data'!$AF2:$HL2<PERCENTILE('1b. Import Morningstar Data'!$AF2:$HL2,0.001),'1b. Import Morningstar Data'!$AF2:$HL2))/100,"")
It works perfectly fine on its own. However I would like to replace the 3 "$AF2:$HL2" portions of it with some kind of OFFSET MATCH MATCH type function to find the arrays to compute it from instead of a fixed row numbers.
I came up with the following (that portion doesn't work):
=OFFSET('1b. Import Morningstar Data'!$A$1,MATCH(A3,'1b. Import Morningstar Data'!$A:$A,0),MATCH('1b. Import Morningstar Data'!AF1,'1b. Import Morningstar Data'!1:1,0),,COUNT('1b. Import Morningstar Data'!AF1:HL1))
The combined function as of right now looks like this (Obviously also doesn't work):
=IFERROR(AVERAGE(IF(OFFSET('1b. Import Morningstar Data'!$A$1,MATCH(A3,'1b. Import Morningstar Data'!$A:$A,0),MATCH('1b. Import Morningstar Data'!AF1,'1b. Import Morningstar Data'!$1:$1,0),,COUNTA('1b. Import Morningstar Data'!$AF$1:$HL$1))<PERCENTILE(OFFSET('1b. Import Morningstar Data'!$A$1,MATCH(A3,'1b. Import Morningstar Data'!$A:$A,0),MATCH('1b. Import Morningstar Data'!AF1,'1b. Import Morningstar Data'!$1:$1,0),,COUNTA('1b. Import Morningstar Data'!$AF$1:$HL$1)),0.001),OFFSET('1b. Import Morningstar Data'!$A$1,MATCH(A3,'1b. Import Morningstar Data'!$A:$A,0),MATCH('1b. Import Morningstar Data'!AF1,'1b. Import Morningstar Data'!$1:$1,0),,COUNTA('1b. Import Morningstar Data'!$AF$1:$HL$1))))/100,"")
I know that last one is a big formula and it's hard to figure out where the error is but if you could manage. It would be SOOOOOOOOOO appreciated.
Thank you so much in advance for taking the time to figure out this problem with me.
Gabriel