How to Condense Scattered Values into a Column Using Excel Formulas
Question details
The user needs a formula to consolidate matching numeric values into an ordered list while automatically skipping rows or cells that are blank or contain formulas returning blank results.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Condensing scattered data points into a continuous, neat column without manually deleting rows or disrupting existing formulas.
- Observed behavior
- Blank cells or formulas returning blanks interrupt the data flow, requiring a dynamic function to bypass them and pull only successive valid values.
Ensure your dataset uses absolute references correctly for the source ranges, and verify that your spreadsheet software supports the AGGREGATE function.
Use INDEX and AGGREGATE Formulas to Skip Blanks
A robust formula method that retrieves non-blank, matching values in sequence without altering the original dataset or deleting rows.
This approach uses the AGGREGATE function to identify the row numbers of cells that meet your criteria and are not blank. The INDEX function then uses those row numbers to pull the actual values.
By wrapping the entire formula in IFERROR, you ensure that once all matching values are extracted, the remaining cells simply display as blank rather than showing error codes.
Determine the range containing the values you want to extract and the criteria ranges you need to match against.
Select the top cell of your destination column and enter the formula: =IFERROR(INDEX($I$13:$I$22,AGGREGATE(15,3,1/(($G$13:$G$22=K$12)*($H$13:$H$22=$L$11))*ROW($G$13:$G$22),ROW(1:1))-ROW($A$12)),""). Adjust the cell references to match your specific worksheet.
Press Enter to apply the formula, then click and drag the fill handle at the bottom-right corner of the cell downwards to auto-fill the formula for successive values.

Remove Blank Cells Using Go To Special (Manual Method)
If you do not require a dynamic formula and just want to quickly condense static data by physically removing blanks.
Effortlessly Manage Array Formulas in WPS Office
WPS Spreadsheet fully supports advanced functions like INDEX, AGGREGATE, and dynamic arrays. You can easily condense your scattered values using exact Microsoft Excel formulas with zero compatibility issues.
- 1. Open your dataset: Launch WPS Spreadsheet and open the document containing your scattered numeric values.
- 2. Select the destination: Click on the cell where you want your condensed list to begin.
- 3. Apply the formula: Paste your INDEX and AGGREGATE formula, updating the cell ranges to match your worksheet, and press Enter.
- 4. Fill the column: Drag the fill handle downward to dynamically extract the rest of the non-blank matching values.

Frequently Asked Questions
Can I use the FILTER function instead of AGGREGATE to condense scattered values?
Yes, if you are using a newer version of Excel or WPS Office that supports dynamic arrays, you can use the formula =FILTER(range, range<>"") to instantly extract non-blank values into a new continuous column.
Why does my AGGREGATE formula return a #NUM! error?
This usually occurs if the formula references an incorrect row offset or if there are no more matching values left to return. Wrapping your main formula in an IFERROR() function will replace these errors with a clean blank space.
How does the ROW() function work inside this array formula?
The ROW() function generates an array of sequential row numbers corresponding to your source data. The AGGREGATE function uses these numbers to calculate the exact position (or relative row index) of the next valid, non-blank match so the INDEX function can pull the correct value.




