If an array is provided as an input to a normally scalar argument of some functions like:
INDEX
GCD
GOOGLETRANSLATE
OFFSET
QUERY
IMPORTRANGE
AND
It doesn't return an array (even if wrapped by ARRAYFORMULA); it only gets the value for the first item in the array. Take this example,
Key | Value |
---|---|
1 | A |
2 | B |
3 | C |
4 | D |
5 | E |
6 | F |
7 | G |
I want to get row 1 and row 5's Value
. I tried
=INDEX(A2:B16,{1;5},2)
Syntax for INDEX
is INDEX(array, row,column)
. When a array is provided as a row argument, It only returns the value for first item, 1
instead of returning the value for {1;5}
.
Actual output | Expected output |
---|---|
A | A |
E |
How to fix?