Question: The sheet Inventory lists a grocery store s inventory for two months. Calculate the percent change for each item to two decimal places. If the

The sheet Inventory lists a grocery stores inventory for two months. Calculate the percent change for
each item to two decimal places. If the formula gives an error, put "Initial Stock" in the cell. Note that
when old contains a zero then the formula results in a division by zero.
Your solution must have the important property that when we add new products to the inventory, then
the output will correctly update.
Write a simple specification such as:
INPUT: old, an array of numbers.
new, an array of numbers and
error_text defining a string. old and new have the same number of cells.
OUTPUT: The percent change given by the formula (new-old)/old. When this fraction is not defined,
output the string error_text. The formula looks like LAMBDA(old,new,error_text, ...). An example for
the actual argument for error_text is "Initial Stock".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!