Help with a lookup problem

PM1

Board Regular
Joined
Oct 28, 2005
Messages
192
Hi All, I have a simple Spreadsheet that racks what we buy and converts from multiple currencies to a USD & EUR figure

1.00 QAR 38400.000 38400.000 €7,680.00 $10,971.43

So Qty 1 x QAR38400 = €7680 or $10971.43 depending upon Exchange Rates

My rates are in a table and fixed each month so at present I use the formula +total val * vlookup(Currecy, table, col no,0)* qty for Eur and Division for USD.

2013 2014
Month JAN JAN JAN JAN
Currency € $ € $
AED 0.2 3.5 0.2 3.500
BHD 2 0.4 2 0.350
USD 0.7 1.0 0.7 1.000
QAR 0.2 3.5 0.2 3.500
KWD 2.6 0.3 2.6 0.269
SAR 0.2 3.5 0.2 3.500
EUR 1 0.7 1 0.700
GBP 1.2 0.6 1.2 0.583
CHF 0.8 0.875 0.8 0.875
MAD 0.1 7.0 0.1 7.000
ZAR 0.1 7.0 0.1 7.000

Now in my main table I have a date field and what I need to do is for the lookup to look at the date field and use the Month to lookup in the exchange table and bring that result, bearing in mind that each month I will add new column to represent that month. Only 2013 is fixed.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
A little more information about the lookup table is needed. Is it set up like this?

20132014
MonthJANJANFEBFEB...JANJAN
Currency$$...$
AED0.2 3.5.........0.23.5

<tbody>
</tbody>

Are the months in row 2 text or are they formatted dates? Formatted dates might allow lookup formulas with a few less nested functions.
 
Last edited:
Upvote 0
Yes, except I use 1,2 to represent Jan,Feb

I was trying IF($C1969='SAP Exc Rates'!$B$1,SUM($I1969)*VLOOKUP($H1969,'SAP Exc Rates'!$A$4:$AA$14,4,0)*$G1969,IF($C1969='SAP Exc Rates'!D1,AND('Master LPO Database'!B1969='SAP Exc Rates'!D2),VLOOKUP($H1969,'SAP Exc Rates'!$A$4:$AA$14,4,0)*$G1969)) but slowly realised that it was going to become a never ending formula.

Just to advise that I would use Jennies html function but my works firewall blocks that, sorry
 
Upvote 0
Here is what I have to determine the conversion factors. I just wanted to show what the lookup portion of the larger formula might be.

ABCDEFGHIJKLMNOPQR
1DateLocal
Currency
EuroUSD20132014
2Feb 2, 2013BHD65Month112233112233
3Feb 2, 2014AED99101Currency$$$$$$
4AED112233445566778899101
5BHD876543210.90.8
6USD2.512.412.312.212.11

<tbody>
</tbody>

CellFormulas, copied downward
C2=INDEX(IF(YEAR(A2)=2013, $G$4:$L$6, $M$4:$R$6), MATCH(B2, $F$4:$F$6, 0), MATCH(MONTH(A2), $G$2:$L$2, 0))
D2=INDEX(IF(YEAR(A2)=2013, $G$4:$L$6, $M$4:$R$6), MATCH(B2, $F$4:$F$6, 0), MATCH(MONTH(A2), $G$2:$L$2, 0) + 1)

<tbody>
</tbody>

<tbody>
</tbody>
I have divided what I had hoped would be one lookup table into two lookup tables. The currency conversion rates for 2013 are in columns G through L, 2014 are M through R. If your conversion table had dates, Excel month and year in single cells, I could have done away with the IF.

The first MATCH determines which row in the table to use. The second MATCH determines the column. The USD is one column to the right of the Euro, so in D2, the column to match is the Euro column plus one.

To extend this into later years, 2015 and beyond, will require nested IFs.

Perhaps someone else has a better solution for the lookup.
 
Upvote 0

Forum statistics

Threads
1,215,569
Messages
6,125,600
Members
449,238
Latest member
wcbyers

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