Write a spreadsheet formula from a description

Writes one spreadsheet formula from a plain description of your columns and goal, with a line-by-line explanation and an edge case.

Task: Write one spreadsheet formula that does what I describe below. Context: I use [spreadsheet app]. My data sits in sheet [sheet name], with these columns in row 1 starting at A: [column headers in order]. The data runs from row 2 to about row [last row]. I want the formula in cell [target cell] to [what the formula should do]. Rules: - Use only functions that exist in [spreadsheet app] and name any function you are unsure about. - Use cell references that match my columns exactly. - If my description allows two readings, pick one, say which, and give the other as a variation. Result: The formula in a code block, then a plain explanation of each part in at most five bullets, then one edge case, such as blank cells or text in a number column, and how the formula handles it.

Updated