There’s a fully automatic method that relies on matching and indexing. To use the “match” function without enabling regular expressions, you would add a condition column on the first sheet that has one particular value when the row is to be transferred to the second sheet. For example, if “qty” is the fourth column then the condition column could use: IF($D4>0;“1”;""), which is filled down the condition column to cover every item—the row value uses relative addressing.
On the destination sheet the first column, which can be hidden later, contains the row numbers matching the desired condition. The range for the “match” function is changed for each row such that you’re searching for the next instance of the desired condition. Start by putting number “1” in $A$1. In $A$2 put:
=MATCH(1,INDIRECT("$Sheet1.$e$"&$A1+1&":$e$5000"),0)+$A1
assuming column “E” is the condition column. The contents of $A$2 are then filled down the column as far as necessary to match the complete parts list. Subsequent columns are filled with formulas in this form to transfer the rows from the first sheet:
=IF(ISNUMBER($A1),INDEX($Sheet1.$B$1:$B$32000,$A1,1),"")
Sample attached…
RowSelector.ods (11.1 KB)
The condition column on the first sheet can be eliminated if you enable regular expression matching for the “match” function. Then you can craft a regular expression to match non-zero numbers.