Sumproduct with counting array

merry_fay

Board Regular
Joined
Oct 28, 2010
Messages
54
Hi,

I'm trying to set up a sumproduct using a count as the 2nd array

eg Sumproduct(A2:A10,1 to 9)
so the output is: A2*1, A3*2, A4*3 etc

I'm having problems working out how to do the numbers side (1 to 9 bit) & can't find any examples. I know I could create a range & enter the numbers in the cells but this would be a last resort!

Can anyone help please?

Thanks
merry_fay
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Try:

=SUMPRODUCT(A2:A10,{2,3,4,5,6,7,8,9,10})
 
Upvote 0
Thanks guys!!! Both methods work but I've adapted njimack's slightly as it's more dynamic:

=SUMPRODUCT(A1:A10,ROW(A1:A10)-ROW(A1)+1)

(my actual final formula is a bit too lengthy to post as all the references are replaced with offsets & matches, but this gives the gist & works!!)

This means I can use a range anywhere & am not fixed to row 1!

Thankyou

:biggrin:
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,548
Members
452,927
Latest member
rows and columns

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top