Write a spreadsheet formula from a plain description

Writes one spreadsheet formula from your plain description and column layout, explains it in three lines and gives a test case.

Task: Write one spreadsheet formula that does the following in [spreadsheet program and version if known]. Context: What I want is [describe the result in plain words]. My data starts in row [first data row]. The columns are [column letter and meaning for each relevant column]. Empty cells can occur in [which columns, or none]. Rules: - Use only functions that exist in [spreadsheet program], and name any function you are not sure exists in my version. - Handle empty cells and errors the way I said, or ask me one question if I did not say. - Prefer a formula I can read in six months over a clever one. - If the task cannot be done in one formula, say so and give the shortest two-step solution instead. Result: The formula in a code block, a three-line explanation of what each part does, and one test case with sample inputs and the expected result.

Updated