How to Extract Excel Rows with Quantity > 0 into Another Worksheet
Question details
The user needs to extract or copy specific rows from a purchase-order template to a separate worksheet, specifically targeting rows where the quantity column contains a positive number.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Managing purchase orders where hundreds of rows exist, and only items with a quantity greater than zero need to be moved or referenced in another destination sheet.
- Observed behavior
- Currently, the user has a large dataset and wants a streamlined, automated way to filter and display only the rows with positive quantities on a new worksheet without manually copying each row.
Verify the exact column letters where your source data (e.g., product codes) and quantity values reside. Ensure your dataset does not contain entirely blank rows that could interfere with continuous array formulas.
Use the FILTER Function (Recommended for Microsoft 365 & WPS Office)
The most efficient and dynamic way to extract rows based on a condition, automatically updating when quantities change.
The FILTER function dynamically spills data into adjacent cells based on the criteria you set. It is the best method for modern spreadsheet software users.
Open the destination worksheet where you want the extracted rows to appear and click on the starting cell (e.g., A1).
Type the formula =FILTER(Sheet1!A:C, Sheet1!C:C>0). Replace 'Sheet1!A:C' with your actual data range and 'Sheet1!C:C' with the column that contains your quantities.
Press Enter. The array will automatically spill the filtered data, extracting only the rows where the quantity is greater than zero.

Use INDEX and AGGREGATE Formulas (For Older Excel Versions)
A formula-based alternative for older versions of Excel that do not support dynamic array functions like FILTER.
Sort by Quantity and Copy Data Manually
A quick, manual method if you only need a one-time extraction without dynamic updates.
Extract and Manage Spreadsheet Rows Easily with WPS Office
WPS Spreadsheet fully supports dynamic array functions like FILTER, making it incredibly easy to extract specific rows based on quantity across multiple worksheets. It is highly compatible with Microsoft Excel and helps streamline complex data tasks.
- 1. Open your workbook: Launch WPS Spreadsheet and open your purchase-order workbook.
- 2. Prepare the destination sheet: Navigate to a new, blank worksheet where you want the extracted data to go.
- 3. Apply the FILTER function: Type =FILTER(Sheet1!A:C, Sheet1!C:C>0) in the first cell and press Enter.
- 4. Review your data: Watch as WPS Spreadsheet instantly extracts all rows with a quantity greater than zero, updating in real-time if the source changes.

Frequently Asked Questions
Why is the FILTER function returning a #CALC! error?
This error occurs if there are no rows that meet the criteria (e.g., if no quantities are greater than zero). You can avoid this by adding a third argument to the FILTER function to handle empty results gracefully, like this: =FILTER(A:C, C:C>0, "No Items").
Can I extract rows based on multiple conditions at once?
Yes, you can multiply conditions within the FILTER function. For example, to extract rows that have a positive quantity AND belong to a specific category, use the formula: =FILTER(A:C, (C:C>0)*(B:B="Category1")).
Will the manual sorting method update automatically if my original data changes?
No, the manual Sort and Copy method is entirely static. If the source data changes, you will need to delete the old extracted data and repeat the sorting and pasting process. If you need dynamic updates, use the FILTER formula method instead.




