vlookup using months and years help please, or is pivot table setup better here?

gadgetic

New Member
Joined
Apr 26, 2015
Messages
9
Hi

I have a table of exchange rates sorted by "month-year", here is a small sample:

DateAUDEURCDNUSD
Jan-140.5419470.8396310.5722790.610054
Feb-140.5341880.8179290.5456430.602991
Mar-140.5404530.822910.5421230.598301
Apr-140.5473750.836540.538010.601395
May-140.5536180.8242660.5398690.596019
Jun-140.546090.8095850.5418880.592487
Jul-140.5512680.8012820.5429770.590388
Aug-140.5538940.7900140.5463290.586786
Sep-140.5593780.7982120.5487270.600745
Oct-140.5542320.793840.5593470.612557
Nov-140.5483960.7890790.5557720.622975
Dec-140.5219210.8005120.5629360.638325

<tbody>
</tbody>

In another sheet I have sales entries in different currencies, I would like to pull the correct exchange rate from the above table using month and year from the sales entry.

So for example if I had a sale on 15th July 2014 in CDN 35.00

I need a formula to correctly find the currency exchange rate to use is 0.542977

I have separated the sales entry values into different columns by currency. So the CDN filter is already done. I guess I could make x4 vlookup tables for each currency, but I still have the issue of searching by month-year...

Many Thanks

Gurpreet
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
The formula you need is:

=INDEX($B$2:$E$13,MATCH(A17-DAY(A17)+1,$A$2:$A$13,0),MATCH(B17,$B$1:$E$1,0))

B2:E13 = The Exchange Rate Values
A17 = The Data of the Transaction
A2:A13 = The month Dates
B1:E1 = The Currency Types

Let me know if this needs further clarity
 
Upvote 0
The formula you need is:

=INDEX($B$2:$E$13,MATCH(A17-DAY(A17)+1,$A$2:$A$13,0),MATCH(B17,$B$1:$E$1,0))

B2:E13 = The Exchange Rate Values
A17 = The Data of the Transaction
A2:A13 = The month Dates
B1:E1 = The Currency Types

Let me know if this needs further clarity

Hi

That worked a treat. My sales transaction date also had time in it, but after truncating for that, worked superb.

Thank You for your help.

First time I used the INDEX function, nice tool to have.

Gurpreet
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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