The garden shop's order sheet needs several small automations. This set revisits custom functions and scripts that write values. Decide which kind each prompt requires before you open the editor: a custom function returns a result to a cell, while an entry function reads and changes the workbook when you run it.
The data includes a canceled line with zero units and several fractional costs. Don't use a truthiness check to treat every zero as missing. When a range is passed to JavaScript, keep its row-and-column shape in mind. setValues needs one nested array per output row.
The tasks use fresh data and the APIs from the two earlier lessons. Each starts from a clean copy, so there is no need to preserve another exercise's script. Keep output in column D and leave the original inputs available for checking.