VBA solution for currency change in different columns

mpatino

Board Regular
Joined
Jul 8, 2009
Messages
82
Hi guys,

wondering if someone could help me get a VBA solution for my currency exchange to different currencies. I am travelling to different countries so I am expending money in different currencies, however, I'd like to have a column where I can see how much did I pay in USD. This is an example of what am I doing:

[TABLE="class: outer_border, width: 500, align: center"]
<tbody>[TR]
[TD]Date[/TD]
[TD]$[/TD]
[TD]₡[/TD]
[TD]र[/TD]
[TD]£[/TD]
[/TR]
[TR]
[TD]Nov-07-14[/TD]
[TD]35.94[/TD]
[TD][/TD]
[TD]2,030.47[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Nov-08-14[/TD]
[TD]10.71[/TD]
[TD][/TD]
[TD]605.12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Nov-08-14[/TD]
[TD]10.71[/TD]
[TD][/TD]
[TD][/TD]
[TD]17.00[/TD]
[/TR]
[TR]
[TD]Nov-09-14[/TD]
[TD]29.00[/TD]
[TD]15,776.00[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

So, I'd like to have a VBA to help me convert to USD in column B no matter if I enter a value in columns C, D or E

Thank you,
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Try in this way:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]₡[/TD]
[TD]र[/TD]
[TD]£[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD]Fx Rates $[/TD]
[TD]544[/TD]
[TD]56.4961[/TD]
[TD]1.5873[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Date[/TD]
[TD]$[/TD]
[TD]₡[/TD]
[TD]र[/TD]
[TD]£[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]11/07/2014[/TD]
[TD][/TD]
[TD][/TD]
[TD]2030.47[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]11/08/2014[/TD]
[TD][/TD]
[TD][/TD]
[TD]605.12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]11/08/2014[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]17[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]11/09/2014[/TD]
[TD][/TD]
[TD]15776[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I have calculated the Fx Rates dividing the amounts in your table. For example the Fx Rate $/£ 17/10.71 = 1.5873 ecc

In Cell B5 copy the following formula:

{=INDEX(C5:E5,MATCH("*",IF(ISNUMBER(C5:E5),TEXT(C5:E5,"General")),0))/INDEX($C$2:$E$2,MATCH("*",IF(ISNUMBER(C5:E5),TEXT(C5:E5,"General")),0))}

enter it with Ctrl+Shift+Enter.

Then scroll down for all the $ amounts that you want to calculate.
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

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