(Office Insider Beta only)
Windows: 2203 (Build 15104)
Mac: 16.60 (220304)

Returns the specified rows from an array.

## Syntax

=CHOOSEROWS(array,row_num1,[row_num2],…)

The CHOOSEROWS function syntax has the following arguments:

• array    The array containing the rows to be returned. Required.

• row_num1    The first row number to be returned. Required.

• [row_num2]    Additional row numbers to be returned. Optional.

## Errors

Excel returns a #VALUE error if the absolute value of any of the row_num arguments is zero or exceeds the number of rows in the array.

## Examples

Copy the example data in the following table and paste it in cell A1 of a new Excel worksheet. If you need to, you can adjust the column widths to see all the data.

Returns an array of rows 1, 3, 5, and 1 again from the array in the range A2:B7.

 Data 1 2 3 4 5 6 7 8 9 10 11 12 Formulas =CHOOSEROWS(A2:B7,1,3,5,1)

Returns an array of rows 1, 3, 5, and 1 again from the array in the range A2:B7 using array constants.

 Data 1 2 3 4 5 6 7 8 9 10 11 12 Formulas =CHOOSEROWS(A2:B7,{1,3},5,1)

Returns an array of the last two rows from the array in the range A2:B7 in the order of row four and then row three.

 Data 1 2 3 4 5 6 7 8 9 10 11 12 Formulas =CHOOSEROWS(A2:B7,-1,-2)
{"ft_lang_label":"__label__en","ft_lang_prob":0.5181774,"math_prob":0.9232465,"size":1295,"snap":"2022-27-2022-33","text_gpt3_token_len":437,"char_repetition_ratio":0.13710302,"word_repetition_ratio":0.40074906,"special_character_ratio":0.35907337,"punctuation_ratio":0.14035088,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9533113,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-25T21:44:53Z\",\"WARC-Record-ID\":\"<urn:uuid:614fc3b9-a40a-41cd-a3e9-3c44c10c3dab>\",\"Content-Length\":\"124141\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:88f6180f-08f6-405f-b8cd-972def11a90c>\",\"WARC-Concurrent-To\":\"<urn:uuid:93a3e2dc-a453-4c18-8b87-cd342bfe71cb>\",\"WARC-IP-Address\":\"23.219.8.110\",\"WARC-Target-URI\":\"https://support.microsoft.com/en-us/office/chooserows-function-51ace882-9bab-4a44-9625-7274ef7507a3\",\"WARC-Payload-Digest\":\"sha1:YTLAQYXGHO27FGB3SLVVJ4KIWFB4VBLF\",\"WARC-Block-Digest\":\"sha1:OIXIPJQTB4WLG63ZMB45PTZ3EEZRIUGB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103036099.6_warc_CC-MAIN-20220625190306-20220625220306-00671.warc.gz\"}"}