How to Use Excel Formulas to Return Values While Skipping Zeros
Question details
The user needs an Excel formula to dynamically filter a dataset, extracting specific components like position, sample, and volume, while omitting any entries where the volume is zero.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Processing a sample-plate output or complex dataset where rows with zero values need to be excluded from the final dynamically generated list.
- Observed behavior
- The user requires an automated array output that correctly arranges the required columns in a specific order without displaying the zero-volume components.
Ensure you are using Microsoft 365 or Excel 2021 and later, as these solutions rely on modern dynamic array functions which are not supported in older versions of Excel.
Use the FILTER Function to Skip Zeros
The FILTER function is the most direct way to extract rows from a dataset based on a specific condition, such as excluding zero values.
By setting the include argument of the FILTER function to check for values greater than zero, you can easily spill an updated array that omits the unwanted rows.
Click on the blank cell where you want the top-left corner of your new filtered list to begin.
Type `=FILTER(A2:C20, C2:C20>0, "No Data")` where A2:C20 is your entire dataset and C2:C20 is the volume column you are checking for zeros.
Hit Enter. The formula will automatically populate the neighboring cells with the filtered data, skipping any rows where the volume was zero.

Combine HSTACK, TOCOL, and FILTER for Complex Layouts
If your source data is not in a simple table and requires combining multiple scattered ranges, use HSTACK alongside FILTER.
Create a Custom LAMBDA Function
For users who repeatedly perform this specific filtering task across different workbooks, defining a custom LAMBDA function saves time.
Easily Filter Out Zero Values Using WPS Spreadsheet
WPS Spreadsheet fully supports advanced dynamic array functions like FILTER, HSTACK, and TOCOL. You can easily clean up your datasets, organize sample plates, and skip zero values without needing complex legacy formulas.
- 1. Open your dataset in WPS: Launch WPS Spreadsheet and open the .xlsx file containing your sample data.
- 2. Enter the FILTER formula: Select an empty cell and type `=FILTER(A2:C20, C2:C20>0)` to filter the data range based on the volume column.
- 3. Review your dynamically filtered list: Press Enter to instantly generate a clean list that automatically excludes any zero-value entries.

Frequently Asked Questions
Can I skip zeros in older versions of Excel that don't support FILTER?
Yes, but it requires much more complex formulas using combinations of IF, INDEX, SMALL, and ROW functions entered as legacy array formulas (Ctrl+Shift+Enter), or using the Power Query feature to filter out the zeros.
Why is my FILTER formula returning a #CALC! error?
The #CALC! error occurs when the FILTER function cannot find any data that meets your criteria (e.g., if all volumes are zero). To prevent this, add the optional [if_empty] argument, like `=FILTER(A2:C20, C2:C20>0, "No Results")`.
Can I sort the results alphabetically or numerically after skipping the zeros?
Absolutely. You can nest your FILTER function inside a SORT function. For example, `=SORT(FILTER(A2:C20, C2:C20>0), 1, 1)` will filter out the zeros and then sort the resulting array based on the first column in ascending order.




