A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Lorenz wrote:
my function is trying to do this.
=QUARTILE((1,2,3,4)),3)
Overall, how do I turn (1,2,3,4) in to an array that Quartile can use?
If you had 4 constants, you would write:
=QUARTILE({4,2,1,3},3)
But note that the result is 3.25, not 3. If you are really interested in finding the second largest or third smallest, you would write:
=SMALL({4,2,1,3},3)
or
=LARGE({4,2,1,3},2)
Note the curly braces around the constant array. But that syntax works only for constants.
You don't have constants. Instead, you have expressions of the form IFERROR(VLOOKUP(....),.0). In that case, you might write something like the following:
=QUARTILE(CHOOSE({1,2,3,4}, VLOOKUP("a",$C$1:$D$4,2,0), VLOOKUP("b",$C$1:$D$4,2,0),
VLOOKUP("c",$C$1:$D$4,2,0), VLOOKUP("d",$C$1:$D$4,2,0)),3)
That formula can be normally-entered (press Enter as usual) because Excel recognizes {1,2,3,4} as an array.
(In my example, C1:C4 has the letters "a", "b", "c" and "d" in random order, and D1:D4 has the corresponding numbers 1, 2, 3 and 4.)