How to Pull Categorized Excel Data into Another Sheet Without Blank Rows
Question details
The user needs to automatically extract categorized data from one sheet to another while ignoring blank rows and keeping category groups intact.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Organizing and consolidating categorized data across multiple sheets.
- Observed behavior
- The target sheet should dynamically update with changing row counts, maintain category groupings, and exclude any empty rows from the source data.
Convert your source data into an official Table format (by pressing Ctrl+T) to ensure that any new rows are automatically included in your dynamic formulas.
Use FILTER and SORT Functions
The most efficient way to pull data dynamically while removing blanks and grouping by categories.
Dynamic array formulas like FILTER and SORT allow you to automatically extract and organize data. As long as your source data is in an official Table, the output will expand and contract automatically without manual adjustments.
Navigate to Sheet2 and click on the top-left cell where you want the extracted data to begin.
Type =FILTER(Table1, Table1[Value]<>"") to pull all records where the 'Value' column is not blank. Replace 'Table1' and 'Value' with your actual table name and the column you want to check for blanks.
To keep category groups together, wrap your formula in a SORT function: =SORT(FILTER(Table1, Table1[Value]<>""), {1,2}, {1,1}). This sorts the filtered data by the first and second columns in ascending order, preserving your categories.

Use Power Query for Complex Layouts
Best for messy data where categories are stored in header rows and need to be filled down before filtering.
Organize Spreadsheet Data Effortlessly in WPS Office
WPS Spreadsheet provides powerful dynamic array formulas like FILTER and SORT, fully compatible with Microsoft Excel, helping you clean and consolidate categorized data without blank rows in seconds.
- 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your categorized source data.
- 2. Convert to Table: Highlight your source data and press Ctrl+L or Ctrl+T to format it as an official Table.
- 3. Apply dynamic formulas: Navigate to your destination sheet and enter the =FILTER() formula to pull the data instantly without blank rows.

Frequently Asked Questions
Why is my FILTER formula returning a #CALC! error?
The #CALC! error occurs if the FILTER function cannot find any data that meets your criteria (for example, if all rows in the source data are blank). You can prevent this error by adding a third argument to handle empty results: =FILTER(Table1, Table1[Value]<>"", "No Data Found").
How can I pull data to another sheet without using formulas?
You can use the Advanced Filter feature. Go to the Data tab, select Advanced Filter, choose 'Copy to another location', specify your source range, set a criteria range to exclude blanks (e.g., '<>'), and select the destination cell. Keep in mind that unlike dynamic formulas, the Advanced Filter method does not update automatically when source data changes.
Will the SORT function mess up the order of my sub-categories?
No, as long as you configure the sort array correctly. By using '{1,2}' as the sort index, the spreadsheet sorts by the first column (Main Category) and then by the second column (Sub-category). This ensures that all hierarchical groupings remain perfectly intact.




