This one is quite long but the best alternative is a relatively easy SUMPRODUCT function:

http://www.excelforum.com/excel-form...-too-long.html