
Originally Posted by
tigeravatar
The formula creates an array of position numbers that match the criteria. If B3:B13 = D1, then get the position of that cell. B3 would be position 1, B4 is position 2, etc. Index loads A3:A13 into an array, and the small determines which position in that array to use. the last argument, Row(1:1) will return the number 1, and as the formula is copied down, that last argument becomes Row(2:2) which will return the number 2, etc. That last argument tells small which position number to return.
That was kind of a dense explanation, let me try using an example:
A Values.....BValues
.....A..........1
.....B..........2
.....C..........1
So if the B values = 1, then load their positions into an array. In this case, it will be position 1 and position 3, so it looks like {1,3}
Small gets the number at the position specified (becasue the numbers are increasing, small 1 returns the smallest, small 2 returns the second smallest, etc):
Small({1,3},Row(1:1)) -> Small({1,3},1) -> 1
Small({1,3},Row(2:2)) -> Small({1,3},2) -> 3
Index loaded the A Values into an array, and then using the positions, returns the appropriate one:
Index({A,B,C},1) -> A
Index({A,B,C},3) -> C
Bookmarks