How to Extract Nonblank Cells Without Blank Rows Using Excel Formulas
Question details
The user needs an Excel formula to pull all nonblank values from a source column into a new sheet, preserving the header and removing any blank rows.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Organizing and consolidating data by dynamically skipping blank rows in a source column and compiling the valid entries into a clean list.
- Observed behavior
- The user wants a continuous, sequentially ordered list of nonblank cells on a separate sheet, keeping the original header intact.
Identify the exact sheet name and column range containing your source data, ensuring you have a clear destination sheet ready for the extracted list.
Use the INDEX and AGGREGATE Formula to Extract Nonblank Cells
This advanced formula dynamically pulls all non-empty cells from a source column, skipping blanks without needing VBA or manual filtering.
The combination of IFERROR, INDEX, and AGGREGATE functions creates a robust array-like formula. It evaluates the source range, identifies rows with data, and retrieves them sequentially.
This method is highly effective for dynamically updating lists where blank cells may appear intermittently, working on almost all versions of Excel.
Open your Excel workbook and navigate to the destination sheet where you want the nonblank list to appear. If needed, manually copy the header from row 1 of your source sheet.
Click on the first empty cell below your header (e.g., A2) and enter the following formula: =IFERROR(INDEX(Sheet1!A:A,AGGREGATE(15,3,1/(Sheet1!A:A<>"")*ROW(A:A),ROW(1:1))),"").
Replace 'Sheet1!A:A' in the formula with the actual sheet name and column letter of your source data. Ensure the 'ROW(1:1)' at the end remains as is, as it serves as an incremental counter.
Press Enter to apply the formula. Then, click the fill handle (the small square at the bottom-right corner of the cell) and drag it down the column until the formula returns blank cells, indicating all data has been extracted.

Use the FILTER Function (Modern Excel & WPS Office)
If you are using a newer version of Excel or WPS Office, the dynamic array FILTER function provides a much simpler way to extract nonblank cells.
Effortlessly Filter and Manage Data with WPS Spreadsheet
WPS Spreadsheet fully supports advanced array formulas like INDEX/AGGREGATE and modern dynamic arrays like FILTER. It offers a fast, lightweight, and highly compatible environment for all your data extraction needs.
- 1. Open your Workbook in WPS Spreadsheet: Launch WPS Office and open your .xlsx or .xls file containing the data with blank rows.
- 2. Input the Formula: Navigate to the destination sheet and type the =FILTER(Sheet1!A:A, Sheet1!A:A<>"") or the INDEX/AGGREGATE formula into the target cell.
- 3. View the Extracted List: Press Enter to instantly view your consolidated, non-blank list. Save your document seamlessly in the standard Excel format.

Frequently Asked Questions
Why is my INDEX and AGGREGATE formula returning a #NUM! error?
This usually happens if the AGGREGATE function's 'k' argument (the incremental counter at the end) does not start at 1. Ensure you use ROW(1:1) or ROW(A1) at the end of the formula, which evaluates to 1 for the first cell and increments as you drag it down.
Can I extract nonblank cells horizontally across a row instead of a column?
Yes. To extract nonblank cells horizontally, replace the ROW function at the end of the AGGREGATE formula with the COLUMN function, such as COLUMN(A1). This increments the counter as you drag the formula to the right.
Will this formula automatically update if I add or remove data in the source column?
Yes, both the INDEX/AGGREGATE formula and the FILTER function are fully dynamic. As long as you reference the correct ranges (like A:A), any new data added or deleted in the source column will automatically reflect in the destination sheet.




