Explanation
It is surprisingly tricky to get INDEX to return more than one value to another function.
The problem is that INDEX only returns the first item in the array to the SUM function.
Similarly, this formula:
correctly returns 60, the sum of 10, 20, and 30.
Instead, INDEX delivers a full array of values to SUM.
Jeff Weir has agood explanation here on stackoverflow.
you’re free to use INDEX to retrieve individual values, or entire rows and columns.
MATCH supports approximate and exact matching, andwildcards(* ?)
The N function can be used to convert TRUE and FALSE to 1 and 0 respectively.
When given a text value, the N function returns zero.