Currency Conversion in Excel

I have an excel spreadsheet with a "Unit Price" column. Some of the prices are in Euro (e.g. €12.34) and some in US dollars (e.g.$45.67).

I want to create a new column containing all prices in US dollars.

By examining a cell, how can I determine whether the price is in Euro or US dollars
jking1234Asked:
Who is Participating?
 
Saurabh Singh TeotiaCommented:
Enclosed is the UDF which i wrote since you want to pick the same from the cell formating of the cell..This will only pick the dollar values which you are looking for...

Function getdollar(rng As Range)

    If InStr(1, rng.NumberFormat, "$#,##", vbTextCompare) > 0 Then

        getdollar = rng.Value
    Else
        getdollar = ""
    End If

End Function

Open in new window


Enclosed is the workbook for your reference...

Saurabh...
Getdollar.xlsm
0
 
Rob HensonFinance AnalystCommented:
If the Euro or Dollar symbols are physically typed in rather than just from formatting, you can use the LEFT function to identify the symbol.

=IF(LEFT(A1,1)="€","Euro",IF(LEFT(A1,1)="$","USD","Other")

Thanks
Rob H
0
 
jking1234Author Commented:
The Euro and Dollar symbols are derived from the formatting
0
 
Rob HensonFinance AnalystCommented:
How was the formatting decided on if you don't know what currency the values are?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.