Great, that's very helpful; thank you! However, I've encountered one strange problem: the formula works - clicking the "fx" button brings up the "function arguments" window and the result is correct. However, in the cell it shows up as a zero. Any ideas on what could be wrong? I've tried changing the formatting and extending the width of the column, but neither works.