There are two methods of coercion yes - multiplication and double unary.
The latter is preferable for many as it is deemed the slightly more efficient coercer and also because it's slightly better at handling non-numerics in any summation range.
However the multiplication method has an advantage over double unary in that it can handle arrays of different dimensions (double unary can not).
Needless to say therefore each has it merits and circumstances often preclude either/or
Your first formula:
Implied your committing as an array { } ... this is not required. This is really the fundamental advantage of SUMPRODUCT over an Array - ie does not require CSE.
The above looks ok to me in terms of syntax though I'm curious as to why you're summing the date values ?
Given usage of MONTH & YEAR the above would return an error should any value in F6:F287 be of a type that prevents coercion this is because both functions (MONTH & YEAR) will by their nature coerce the underlying values as though they are dates (numbers) thus if those values are not numeric (text strings etc (including Nulls)) then the above will generate #VALUE! error
Similarly given explicit coercion of the final range regardless of MONTH/YEAR should any value in summation range be non-numeric it too would generate a #VALUE! error
Your second formula
Makes more sense in terms of ranges etc (ie use of J rather than F as final array) but the above would of course still generate #VALUE! errors given use of MONTH & YEAR should any values in F be of a type that prevents coercion.
If the #VALUE! error is an issue on occasion (eg formula nulls etc) you can use an alternative (slower) route of
If coercion is on the other hand not an issue another option would be:
which would be slightly quicker given only one test is conducted
(though the same is true of the TEXT based test the string manipulation would be deemed relatively expensive and thus the MONTH & YEAR tests would be seen as quicker - per Bob Phillips himself - author of white paper)
Bookmarks