Multiply & sum of numbers and the equivalents of datas (Array sum in array)

McExcel

New Member
Joined
Sep 9, 2014
Messages
14
Hi everyone! First post ! Sorry for the title :D My English is not excellent so I show my problem on an example:


A3,13equivalents
C2,62A1
C4,12B2
F10,13C3
D83,2D4
E5
F6
Question: How can multiply Equivalents of A,B,C... in one step?
A*3,13 + C*2,62 + C*4,12 + F*10,13 + D*83,2

<tbody>
</tbody>

The answer should be:120,2 sorry 416,93


I've tried vlookup and with array formulas using (control+shift+enter). But I couldn't solve.

For example:

={SUM(VLOOKUP(A1:A5,equivalents,2,false),B1:B5)} .... not working
 
Last edited by a moderator:

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
What result are you expecting from this which is mathematically incorrect?

A*3,13
 
Last edited:
Upvote 0
Hi everyone! First post ! Sorry for the title :D My English is not excellent so I show my problem on an example:


A
3,13
equivalents
C
2,62
A
1
C
4,12
B
2
F
10,13
C
3
D
83,2
D
4
E
5
F
6
Question: How can multiply Equivalents of A,B,C... in one step?
A*3,13 + C*2,62 + C*4,12 + F*10,13 + D*83,2

<TBODY>
</TBODY>

The answer should be:120,2 sorry 416,93


I've tried vlookup and with array formulas using (control+shift+enter). But I couldn't solve.

For example:

={SUM(VLOOKUP(A1:A5,equivalents,2,false),B1:B5)} .... not working

The data is located in A:B, equivalencies in D:E...

Try rather:

=SUMPRODUCT(SUMIF($D$2:$D$7,$A$1:$A$5,$E$2:$E$7)*$B$1:$B$5)
 
Upvote 0
=SUM(LOOKUP($A$1:$A$5,$D$2:$E$7)*$B$1:$B$5)
Your data in D2:E7 has to be sorted by D column

CSE formula

Regards
 
Upvote 0
More exotic solution...

=SUM(INDEX($E$2:$E$7,N(CHOOSE(1,MATCH($A$1:$A$5,$D$2:$D$7,0))))*B1:B5)

CSE formula
 
Upvote 0
Omg :D Thanks guys all of them works perfectly! They are very helpful for giving point of view.

The data is located in A:B, equivalencies in D:E...

Try rather:

=SUMPRODUCT(SUMIF($D$2:$D$7,$A$1:$A$5,$E$2:$E$7)*$B$1:$B$5)

Thank you dear Aladin Akyurek. I've get understand quickly your solution.

=SUM(LOOKUP($A$1:$A$5,$D$2:$E$7)*$B$1:$B$5)
Your data in D2:E7 has to be sorted by D column

CSE formula

Regards

More exotic solution...

=SUM(INDEX($E$2:$E$7,N(CHOOSE(1,MATCH($A$1:$A$5,$D$2:$D$7,0))))*B1:B5)

CSE formula

Dear billszysz thanks for your effort. I'd read some index-match solutions but never face lookup solution. Someone says to someone you can't use lookup functions with CSE.

Update: Note for other users. I've checked again. Yes, sum-Lookup solution is working only when datas are sorted, other two solution works in any case.
 
Last edited:
Upvote 0
Omg :D Thanks guys all of them works perfectly! They are very helpful for giving point of view.

Not all of them...

Thank you dear Aladin Akyurek. I've get understand quickly your solution.

You are welcome.

Dear billszysz thanks for your effort. I'd read some index-match solutions but never face lookup solution. Someone says to someone you can't use lookup functions with CSE.

You can if the pre-requisites are met...

Update: Note for other users. I've checked again. Yes, sum-Lookup solution is working only when datas are sorted, other two solution works in any case.

That's exactly right. Of the remaining two, I'd opt for an option that is faster and readily intelligible.
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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