How to Remove Zeros from VSTACK, SORT, and FILTER Results in Excel
Question details
Combine multiple tables dynamically while filtering out blank rows, sorting the results, and ensuring blank cells do not appear as zeros.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Combining and sorting multiple tables using dynamic array formulas.
- Observed behavior
- Blank cells in the source data display as unwanted zeros in the stacked formula results.
Ensure you are using a modern version of Excel or WPS Office that supports dynamic array functions such as VSTACK, FILTER, SORT, and LET.
Use the LET Function to Evaluate and Replace Zeros
Wrap your VSTACK, FILTER, and SORT functions inside a LET function to evaluate the array and replace any zero-value empty cells with blank text.
When Excel references a blank cell in a dynamic array, it automatically evaluates it as a 0. By assigning your complex VSTACK and FILTER formula to a variable using the LET function, you can use a simple IF statement to replace those zeros with empty text.
Use VSTACK to combine your tables (e.g., tblaco, tblbco, tblcco) and nest it inside a FILTER function to exclude rows where Column 1 is empty.
Start your formula with the LET function and name your array variable 'v'. Example: =LET(v, FILTER(VSTACK(tblaco, tblbco), VSTACK(tblaco[Column1], tblbco[Column1])<>"").
Add the IF condition to check if 'v' evaluates to an empty string. If it does, return an empty string (""); otherwise, return 'v'. Wrap this in the SORT function: SORT(IF(v="","",v),1,1).
Input the complete formula into your target cell: =LET(v,FILTER(VSTACK(tblaco,tblbco,tblcco,tbldco,tblhhc),VSTACK(tblaco[Column1],tblbco[Column1],tblcco[Column1],tbldco[Column1],tblhhc[Column1])<>""),SORT(IF(v="","",v),1,1)) and press Enter.

Hide Zeros Using Custom Number Formatting
If you prefer not to modify your complex formula, you can visually hide zeros in the spilled result range using custom cell formatting.
Master Dynamic Arrays with WPS Office
WPS Spreadsheet fully supports advanced dynamic array functions like VSTACK, FILTER, SORT, and LET, allowing you to combine, clean, and analyze data flawlessly without unwanted zero values.
- 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your multiple data tables.
- 2. Input the LET formula: Select the destination cell and type your optimized =LET(...) formula to combine the tables.
- 3. Generate the results: Press Enter to automatically spill the filtered, sorted, and zero-free results across your worksheet.

Frequently Asked Questions
Why do blank cells appear as zeros in VSTACK results?
When Excel or WPS Spreadsheet references an empty cell in a formula or an array manipulation like VSTACK, it evaluates the lack of data as a numerical 0. Using an IF function helps intercept this behavior and display empty text instead.
What is the purpose of the LET function in this formula?
The LET function allows you to assign a name (such as 'v') to a specific calculation result within the formula. This prevents the spreadsheet from having to calculate the resource-heavy VSTACK and FILTER functions multiple times when checking for blank cells.
Are VSTACK and FILTER available in older versions of Excel?
No, dynamic array functions like VSTACK, FILTER, and LET are only available in Microsoft 365, Excel 2021, and modern versions of WPS Office. If you open a workbook containing these functions in an older version, it will return a #NAME? error.




