function?

MrDoc

Active Member
Joined
Jul 30, 2002
Messages
343
Hi,

I frequently need to convert currency form Euro to US Dollar, and from USD to Euro. What would be the best way to create 2 formulas or functions, either using VBA or not, that I could use from any open workbook, so always accessible, to perform those currency conversions? Something like:

1000 * (USD_TO_EURO), where the input (1000) is in USD and the result in Euro, and also the other way around. Of course the "input" would be a value taken from any cell in the workbook.


Thank you in advance for any help.
Best Regards,
MrDoc
 
That's what I do now, but I can´t use the names from any workbook, so I have to define the names in each workbook. Or can I?...

As to the EUROCONVERT, I installed the EUROTOOL add-in, but nothing happened when I selected EUROTOOL CONVERSION from the TOOLS menu. Can you please tell me what exactly are the EUROCONVERT() parameters?

Thank you for your help.
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
That's what I do now, but I can´t use the names from any workbook, or can I....?
I installed the EUROTOOL addi-n, but when I click EUROCONVERSION on the TOOLS menu nothing happens. Can you please tell me exactly what parameters must I use in the EUROCONVERT() function?

Thank you for your help.
MrDoc
 
Upvote 0
From the Help file:

Converts a number to euros, converts a number from euros to a euro member currency, or converts a number from one euro member currency to another by using the euro as an intermediary (triangulation). The currencies available for conversion are those of European Union (EU) members that have adopted the euro. The function uses fixed conversion rates that are established by the EU.

Syntax

EUROCONVERT(number,source,target,full_precision,triangulation_precision)

Number is the currency value you want to convert, or a reference to a cell containing the value.

Source is a three-letter string, or reference to a cell containing the string, corresponding to the ISO code for the source currency. The following currency codes are available in the EUROCONVERT function:

Country Basic unit of currency ISO code
Belgium franc BEF
Luxembourg franc LUF
Germany deutsche mark DEM
Spain peseta ESP
France franc FRF
Ireland pound IEP
Italy lira ITL
Netherlands guilder NLG
Austria schilling ATS
Portugal escudo PTE
Finland markka FIM
Euro member states euro EUR



The following countries may adopt the euro after the initial version of EUROCONVERT, and if so, Microsoft will update the EUROCONVERT function. For information about new euro member currencies and updates to the EUROCONVERT function, connect to the Microsoft euro Web site.

Country Basic unit of currency ISO Code
Denmark krone DKK
Greece drachma GRD
Sweden krona SEK
UK pound sterling GBP


Target is a three-letter string, or cell reference, corresponding to the ISO code of the currency to which you want to convert the number. See the previous Source table for the ISO codes.

Full_precision is a logical value (TRUE or FALSE), or an expression that evaluates to a value of TRUE or FALSE, that specifies how to round the result.

Use If you want Excel to
FALSE Use the currency-specific rounding rules, see the table that follows. Excel uses the calculation precision value to calculate the result and the display precision value to display the result. FALSE is the default if the full_precision argument is omitted.
TRUE Ignore the currency-specific rounding rules and instead use the six-significant-digit conversion factor with no follow-up rounding.



The following table shows the currency specific rounding rules, that is, how many decimal places Excel uses to calculate a currency's conversion and display the result.

ISO code Calculation precision Display precision
BEF 0 0
LUF 0 0
DEM 2 2
ESP 0 0
FRF 2 2
IEP 2 2
ITL 0 0
NLG 2 2
ATS 2 2
PTE 1 2
FIM 2 2
EUR 2 2


Triangulation_precision is an integer equal to or greater than 3 that specifies the number of significant digits to be used for the intermediate euro value when converting between two euro member currencies. If you omit this argument, Excel does not round the intermediate euro value. If you include this argument when converting from a euro member currency to the euro, Excel calculates the intermediate euro value that could then be converted to a euro member currency.

Remarks

Excel truncates any trailing zeros in the return value.


If the source ISO code is the same as the target ISO code, Excel returns the original value of the number.


Invalid parameters return #NUM.


This function does not apply a number format.
Examples

These examples assume conversion rates of 1 euro = 6.55957 French francs and 1.95583 deutsche marks. The EUROCONVERT function uses the current rates established by the EU. Microsoft will update the function if the rates change. To get full information about the rules and the rates currently in effect, see the European Commission publications about the euro. For information about obtaining these publications and updates to the EUROCONVERT function, connect to the Microsoft Office euro Web site.

The examples show the resulting value stored in the cell, not the formatted value.

EUROCONVERT(1.20,"DEM","EUR") equals 0.61 euro. Because neither full_precision nor triangulation_precision are specified, the result uses the calculation precision for the euro, which is 2 decimal places.

EUROCONVERT(1,"FRF","EUR",TRUE,3) equals 0.152 euro. When converting to euros, if full_precision is TRUE, the result has the precision specified by triangulation_precision.

EUROCONVERT(1,"FRF","EUR",FALSE,3) equals 0.15 euro. When converting to euros, if full_precision is FALSE, the result uses the calculation precision for the euro, which is 2 decimal places.

EUROCONVERT(1,"FRF","DEM",TRUE,3) equals 0.29728616 DM. Because triangulation_precision is 3, the intermediate euro value is rounded to three places. Because full_precision is TRUE, the resulting deutsche mark value is stored with all significant digits.

EUROCONVERT(1,"FRF","DEM",FALSE,3) equals 0.30 DM. Because triangulation_precision is 3, the intermediate euro value is rounded to three places. Because full_precision is FALSE, the resulting deutsche mark value is rounded to the calculation precision for the deutsche mark, which is 2 decimal places.

HTH

Alan
 
Upvote 0
Look up the EUROCONVERT function in Help for the arguments.

Are you keeping the exchange rate in only one workbook and you would like to reference it? What is the name of the workbook?
 
Upvote 0
Thank you again, Alan and Andrew. However, there must be something wrong with my EUROTOOL add-in, because Excel keeps crashing everytime I try to use it.

So, if I can use defined ranges from one workbook, I'll create a workbook and name it, say, "MyRates". What I need now is to be sure of how to refer to that workbook from any workbook and also how to make the necessary conversions according to the official rule (2 decimal places, the 3rd decimal place will define which way to round the result value, so 200.482 = 200.48 and 200.486 = 200.49).
Best Regards,
MrDoc
 
Upvote 0
Hi,

Set up a workbook, say 'c:\temp\rates.xls with defined names 'Rate1' and 'Rate2' etc. containing respective conversion rates.


In your workbook
=A1*'C:\Temp\rates.xls'!Rate2

HTH

Alan
 
Upvote 0
Create a workbook holding the exchange rate in cell A1 and name the cell eg USDRate. Save the workbook as eg ExchRate.xls.

In any other workbook you can access it like this:

=A1*'C:\ExchRate.xls'!USDRate

changing the path (mine is C:\) if necessary. If you want you can define a range named eg USDRate in the other workbook, referring to:

='C:\ExchRate.xls'!USDRate

Then you can use just:

=A1*USDRate
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,358
Members
449,155
Latest member
ravioli44

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