Automatically Create a Sales Order from Excel Quantities using FILTER
Question details
The user wants to generate a sales order sheet that automatically displays only the products, prices, and quantities selected from a master order submission sheet.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating a dynamic sales invoice or order form based on user-input quantities, filtering out unselected items.
- Observed behavior
- The desired output is a clean list displaying only the rows where the selected product's quantity is greater than zero, ignoring empty or zero-quantity items.
Ensure your source data is organized in clean columns without merged cells, and verify that the quantity column contains numerical values rather than text.
Use the Dynamic FILTER Function (Recommended)
The easiest and most dynamic method for modern spreadsheet software is using the FILTER function to automatically extract rows based on the quantity column.
The FILTER function is a dynamic array formula that automatically spills the results into adjacent cells. If your source data updates, the sales order updates instantly without manual refreshing.
Open the worksheet where you want the final sales order or invoice to appear, and select the top-left cell of the destination range.
Type the formula `=FILTER(Sheet1!A2:C100, Sheet1!C2:C100>0, "No products selected")`. Adjust 'Sheet1!A2:C100' to match the range of your products, prices, and quantities, and 'Sheet1!C2:C100' to match your quantity column.
Press Enter. The formula will automatically spill the filtered products, prices, and quantities into the cells, excluding any items with a zero or blank quantity.

Filter Data using Power Query
If you are using an older version of Excel that does not support dynamic array functions, Power Query is a robust alternative for cleaning and filtering data.
Extract Data using INDEX and AGGREGATE
A traditional formula-based approach for legacy spreadsheet versions that do not support FILTER or Power Query.
Easily Create Dynamic Sales Orders with WPS Spreadsheet
WPS Spreadsheet fully supports dynamic array functions like FILTER, making it incredibly easy to build automated sales orders, invoices, and inventory dashboards. It offers seamless formula execution without performance lags.
- 1. Open your order file: Launch WPS Spreadsheet and open your order submission workbook.
- 2. Select your invoice template: Navigate to your target sales order sheet and click the starting cell for your item list.
- 3. Input the FILTER formula: Type the `=FILTER()` function targeting your product range and specifying the quantity column condition (e.g., >0).
- 4. Press Enter to populate: Press Enter to instantly populate your clean, zero-free sales order ready for printing.

Frequently Asked Questions
Why does my FILTER formula return a #SPILL! error?
A #SPILL! error occurs when the cells where the FILTER function needs to output data are not entirely empty. Clear any text, spaces, or formatting in the adjacent cells below and to the right to allow the formula to spill its results.
Can I filter based on multiple conditions, like quantity and product category?
Yes. You can multiply conditions within the FILTER function to act as an 'AND' logic. For example: `=FILTER(A2:C100, (C2:C100>0)*(D2:D100="Electronics"), "None found")`.
Will the filtered sales order print correctly if the number of items changes?
To ensure perfect printing, you can set a dynamic Print Area or format your destination cells as an organized template. You can also use Conditional Formatting to automatically apply cell borders only to rows that contain data.




