SUMIF: apply function input range

Hello,

I want to use the SUMIF function to get the sum of some amounts in a certain year. However, to get the years from a date one needs to apply the YEAR() function. Is there a way to apply a function on a range? Or, have a function that returns the modified range? Something like:

=SUMIF(FUNCTION(YEAR();E$8:E$9000); “=2012”; P$8:P$9000)

Thanks in advance, Maarten

You can use

=SUMIF(YEAR(E$8:E$9000);"=2012";P$8:P$9000)

But you have to enter it as array function. That is, you have to finish entering by Ctrl+Shift+Enter, or in the wizard check the checkbox “Array”.

Ok, thanks that works almost perfect. Under OS-X it is Command+Shift+Return(or Enter).