# SUMPRODUCT and LOOKUP Table

#### Getting to Know VBA

##### New Member
Hi, I am seeking to create a formula that multiples columns B and C and applies the appropriate currency exchange (refer to second table). The result should be the sum total of all rows, being \$24.29.

 A B C 1 FX Unit Price Open Interest 2 AUD \$100 0.0% 3 SGD \$500 -10.0% 4 GBP \$400 5.6% 5 AUD \$650 4.2%

<tbody>
</tbody>

 6 Rate FX 7 1.00 AUD 8 1.83 GBP 9 0.88 SGD 10 1.12 USD

<tbody>
</tbody>

As an example row 3 should calculate as follows: (\$500*-10%)*0.88.

Your assistance is greatly appreciated.

### Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

##### MrExcel MVP
assuming your data is in a1:c10 as per above, your example is:

=(B3+(B3*C3))*INDEX(\$A\$7:\$A\$10,MATCH(A3,\$B\$7:\$B\$10,0))

...copy up / down as required. I'd do each calculation explicitly first then sum the results, rather than trying to stick it all in a mega-formula.

#### Getting to Know VBA

##### New Member
Thanks Paddy. I'm good with the functions 'Index' and 'Match'. The issue I have is with the "...copy up / down". I'm constrained by the need to compute and capture the result of the sum total of all rows in a single cell, hence l'm leaning towards applying the SUMPRODUCT function, but don't quite know how to create the formula for this.

##### MrExcel MVP
Can you describe how you arrive at the result "being \$24.29."?

#### Getting to Know VBA

##### New Member
Sure, as follows:

Row 2: \$100*0.0%*1.00 = \$0.00
Row 3: \$500*-10.0%*0.88 = -\$44.00
Row 4: \$400*5.6%*1.83 = \$40.99
Row 5: \$650*4.2%*1.00 = \$27.30
TOTAL = \$24.29

##### MrExcel MVP
Sorry for the delay - haven't been around much. With thanks to a few friends:

=SUMPRODUCT(\$B\$2:\$B\$5,\$C\$2:\$C\$5,SUMIF(\$B\$8:\$B\$11,\$A\$2:\$A\$5,\$A\$8:\$A\$11))

Replies
2
Views
364
Replies
3
Views
439
Replies
4
Views
304
Replies
3
Views
223
Replies
2
Views
149

1,130,119
Messages
5,640,218
Members
417,131
Latest member
Seanr19871

### 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?

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