Function Problems

How to Condense Scattered Values into a Column Using Excel Formulas

Huda QurayshiHuda Qurayshi Nov 3, 2026 869 views

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.

How to Condense Scattered Values into a Column Using Excel Formulas
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.
Before you start

Ensure your dataset uses absolute references correctly for the source ranges, and verify that your spreadsheet software supports the AGGREGATE function.

Solution 1Recommended

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.

1
Identify source ranges

Determine the range containing the values you want to extract and the criteria ranges you need to match against.

2
Input the formula

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.

3
Copy the formula down

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.

Use INDEX and AGGREGATE Formulas to Skip Blanks
Understanding AGGREGATE parameters: The '15' tells AGGREGATE to act as the SMALL function, and the '3' tells it to ignore hidden rows, error values, nested SUBTOTAL, and other AGGREGATE functions, ensuring only valid data is processed.
Condense Data Easily in WPS Spreadsheet

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. 1. Open your dataset: Launch WPS Spreadsheet and open the document containing your scattered numeric values.
  2. 2. Select the destination: Click on the cell where you want your condensed list to begin.
  3. 3. Apply the formula: Paste your INDEX and AGGREGATE formula, updating the cell ranges to match your worksheet, and press Enter.
  4. 4. Fill the column: Drag the fill handle downward to dynamically extract the rest of the non-blank matching values.
100% compatible with Microsoft Excel formulas, functions, and file formats (XLSX)Lightweight architecture ensures fast calculations even with complex AGGREGATE formulasFree built-in data cleanup tools to easily manage blanks and organize datasets
microsoft office alternative - wps office

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.