user9419734
user9419734

Reputation: 153

Excel create an array from non-stacked cells

Sumproduct(array1,array2) is an excel formula that performs the dot product.

=Sumproduct({1,2,3},{7,0,5}) results in 1*7 + 0*2 + 5*3 = 22

I want to replace the first array by values stored in non-stacked cells ( for example: A1,A3,B7) I tried =Sumproduct({A1,A3,B7},{7,0,5}) but it doesn't work. It seems I can't create an array from non-stacked cells.

Can you please help me create an array of non-stacked cells in Excel?

Upvotes: 2

Views: 67

Answers (1)

user4039065
user4039065

Reputation:

Try this as an array formula entered with ctrl+shift+enter.

=SUMPRODUCT(CHOOSE(ROW(1:3), A1, A3, B7), CHOOSE(ROW(1:3), 7, 0, 5))

Upvotes: 3

Related Questions