=CHOOSEROWS(array, row_num1, [row_num2], ...)
=CHOOSEROWS(A1:A5,1,3)
This returns the first and third rows of the A1:A5 range. This is because the function takes two arguments: the range and two row numbers. The function will then return the two rows specified in the arguments.
=CHOOSEROWS(A1:A5,3,1)
This example returns rows 3 and 1 from A1:A5. This is because the function takes two arguments: the range and two row numbers. It will return the two rows specified.
=CHOOSEROWS(A1:A5,6)
The formula returns a #VALUE! error because it takes a row number that is out of range. Since the range A1:A5 only has 5 rows, the function cannot return a sixth row.
=CHOOSEROWS(B3:F9,{1,4,7})
The example uses an array constant to get rows 1, 4, and 7 from B3:F9. An array constant is a set of values in curly brackets, { }. The function will take the range and array as arguments, and return the specified rows.
The CHOOSEROWS function enables users to select and return specified rows from an array, creating a new array with the selected rows.