Give me a spreadsheet formula for what I describe.
WHAT I WANT TO DO: [[GOAL]]
TOOL: [[EXCEL_OR_SHEETS]]
MY DATA LAYOUT: [[LAYOUT]] (which columns/rows hold what)
Deliver:
1. The exact formula to paste
2. What each part does, briefly
3. How to adjust it for my cell ranges
4. A common mistake to avoid
5. A simpler alternative if one exists
If there are multiple good approaches, recommend one.