find product of 2 cells and a match index in a row, then sum the result

dalexcel

New Member
Joined
Feb 25, 2016
Messages
1
I would like to find the Sum of the No. Units*price*relevant exchange rate according to month and currency.

Here is my two sets of data:
1. Info
ABCD
DateCurrencyNo UnitUnit Price
105/JanEUR1001.15
207 JanUSD10020
309 FebHKD200100
410 MarEUR3004
528 MarUSD7009

<tbody>
</tbody>


2. Exchange rate matrix (Range named FX)

ABCD
1JanFebMar
2EUR1.11.21.3
3HKD0.130.140.15
4USD111

<tbody>
</tbody>


Essentially what I would like to find is one formula to Sum the products from column C, D, and the index match according to FX the range.

In other words

(C1*D1*Indexmatch to find exchange rate according to A1 and B2)+(C2*D2*Indexmatch to find exchange rate according to A2 and B2) etc......

I would like to avoid adding a column that finds the product for each row. Hence I'm asking for a formula to sum all info at once.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
4,350
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
try this


Excel 2012
ABCDE
1DateCurrencyNo UnitUnit Price
205-JanEUR1001.15126.5
307-JanUSD100202000
409-FebHKD2001002800
510-MarEUR30041560
628-MarUSD70096300
7
8JanFebMar
9EUR1.11.21.3
10HKD0.130.140.15
11USD111
Sheet5
Cell Formulas
RangeFormula
E2=INDEX($B$9:$D$11,MATCH($B2,$A$9:$A$11,0),MATCH(TEXT($A2,"mmm"),$B$8:$D$8,0))*C2*D2
 

radian89

Board Regular
Joined
Nov 12, 2015
Messages
112
Hi Dalexcel,

what you looking for gonna generate very long formula. adding 1 column certainly make it short. take a look at this.

change your month with number, 1, 2, 3, to make the formula work.

exchange rate will use index & match.
the total will use sumproduct.

but if you want to combine it all then the formula will be

D4*E4*INDEX($C$16:$E$18,MATCH(C4,$B$16:$B$18,0),MATCH(MONTH(B4),$C$15:$E$15,0)) +
D5*E5*INDEX($C$16:$E$18,MATCH(C5,$B$16:$B$18,0),MATCH(MONTH(B5),$C$15:$E$15,0)) +
.
.
.
.



2dcahic.jpg
[/IMG]
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,650
Messages
5,854,948
Members
431,687
Latest member
anthonyj

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
Top