Return Selected Rows and Columns from a Dynamic Array in Microsoft Excel
Question details
The user wants to return only selected rows or columns from a dynamic array formula such as LINEST in Microsoft Excel.
- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Extract a particular row or a smaller block of regression results without displaying the entire LINEST output.
- Observed behavior
- The desired result is an array containing only the requested rows and columns.
Confirm that your Excel version supports dynamic arrays and that the cells where results will spill are empty. For the examples below, E2:E12 contains the dependent values and A2:D12 contains the corresponding predictor values.
Extract an entire row or column with INDEX
Use this method when you need one complete row or column from the LINEST results.
INDEX selects values by their positions within an array. Set the column argument to 0 to return an entire row, or set the row argument to 0 to return an entire column.
Select an empty cell and enter =INDEX(LINEST(E2:E12,A2:D12,TRUE,TRUE),1,0). Press Enter to return the first row of regression coefficients.
To extract the standard errors, enter =INDEX(LINEST(E2:E12,A2:D12,TRUE,TRUE),2,0) in another empty area. The row argument 2 selects the second row.
Enter =INDEX(LINEST(E2:E12,A2:D12,TRUE,TRUE),0,1) to return the first column of the LINEST output. Change the final argument to select a different column.
Extract multiple rows and columns with array constants
Use array constants in INDEX to return a selected block instead of the full regression output.
Select values from an existing spilled result
Reference the spill range when LINEST is already entered on the worksheet.
Select LINEST Results with INDEX in WPS Spreadsheet
Use LINEST and INDEX in WPS Spreadsheet to retrieve specific regression values. The cell-by-cell method below selects a two-by-two block without depending on automatic dynamic-array spilling.
- 1. Open your workbook: Launch WPS Spreadsheet and use File > Open to open your Excel workbook.
- 2. Check the data ranges: Select your data and confirm that E2:E12 contains the dependent values and A2:D12 contains numeric predictor values with matching rows.
- 3. Extract the first result: Select an empty cell, such as G2, and enter =INDEX(LINEST($E$2:$E$12,$A$2:$D$12,TRUE,TRUE),ROW(A1),COLUMN(A1)). Press Enter.
- 4. Build the selected block: Use the fill handle to copy G2 across to H2, then select G2:H2 and fill down to row 3. The relative ROW and COLUMN references select the first two rows and columns of the LINEST results.

Frequently Asked Questions
How do I return the entire first row rather than just one value?
Enter =INDEX(LINEST(E2:E12,A2:D12,TRUE,TRUE),1,0) in an empty cell. The explicit column argument 0 requests every column in row 1.
Can I select nonadjacent columns from LINEST?
Yes. In dynamic-array Excel, enter =INDEX(LINEST(E2:E12,A2:D12,TRUE,TRUE),{1;2},{1,3}) to return rows 1 and 2 from output columns 1 and 3.
Why does my formula show #SPILL!?
Select the formula cell and inspect the intended output area. Clear or move blocking cell contents and unmerge cells in that area. If the formula is inside an Excel table, move it to an ordinary worksheet range so it can spill.
What does G2# mean in an INDEX formula?
G2# refers to the entire dynamic array spilling from G2. If G2 contains the LINEST formula, =INDEX(G2#,2,0) extracts its second row. This requires a valid spill originating in G2.
Which LINEST row contains the coefficients and which contains standard errors?
With the stats argument set to TRUE, row 1 contains the coefficients and intercept, and row 2 contains their standard errors. Use INDEX with row 1 or 2 to select them; for multiple predictors, coefficients appear in reverse predictor-column order.




