Your KeyRange may have to be extended to cover a bigger range, but you should be able to do this with a sumproduct formula or an array.