+ Reply to Thread
Results 1 to 10 of 10

Excel 2007 : Currency Conversion

  1. #1
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    402

    Currency Conversion

    Currency Conversion example.xlsx

    How do I auto calc the green cells?

    Basically I have set up a data query from the MSN money website (Columns D-F) and have some amounts formatted as currencies and want to convert them to GBP amounts based on the appropriate currency conversion rate.

    Need some sort of lookup into the table but I don't know how to lookup based on currency formats?

    Thanks
    Last edited by benoj2005; 03-26-2012 at 05:23 AM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Currency Conversion

    You would use

    =A3/VLOOKUP("British pound",D:F,3,FALSE)

    but first you have to remove the trailing spaces on the currency names in the table.

  3. #3
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    402

    Re: Currency Conversion

    The formula needs to take into consideration what currency is in column A.

    Your formula works for B3 because its GBP in A3, but it dosent work for B4,5,6,7 e.t.c as they are dollar, euro e.t.c
    Last edited by benoj2005; 03-26-2012 at 05:34 AM.

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Currency Conversion

    You need to adjust each to its currency name, there is nothing to tell the formula.

  5. #5
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    402

    Re: Currency Conversion

    I was hoping there was some way of not adding in another column stating the currency, surely by formatting a cell Excel has some way of identifying how it is formatted in a formula?

    Somthing along these lines.. =IF(A3=USD,VLOOKUP("US dollar",$D:$F,3,FALSE),IF(A3=EUR,VLOOKUP("Euro",$D:$F,3,FALSE),"ETC"))

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Currency Conversion

    Hi,

    If you want the B3:B7 values to change every time the query is refreshed then you need to use a Sheet_Change event macro.
    Specifically:

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Currency Conversion

    Hi,

    It seems to me that the formulas are fine if you are always trying to divide 5 units of each of the specific five currencies you are using. The divisor is referring to the correct rows in the current table. The only proviso is that the web site from which you are drawing your data does not change its layout and that it is always reporting the 55 currencies you show in exactly the same order.

  8. #8
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    402

    Re: Currency Conversion

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    If you want the B3:B7 values to change every time the query is refreshed then you need to use a Sheet_Change event macro.
    Specifically:

    Please Login or Register  to view this content.
    My Macro/VB is very limited, I just went to create a new macro and pasted this straight into the VB and saved.

    Changed a few figures in the query (Col F) and the run again and the values in COL B didn't change as expected?

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    It seems to me that the formulas are fine if you are always trying to divide 5 units of each of the specific five currencies you are using. The divisor is referring to the correct rows in the current table. The only proviso is that the web site from which you are drawing your data does not change its layout and that it is always reporting the 55 currencies you show in exactly the same order.
    Do you mean the quick division formulas I put in the original example? Ignore them, they won't work on the 5,000 row report I actually want this formula in, this was merely a simple example to get a suitable formula.

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Currency Conversion

    Quote Originally Posted by benoj2005 View Post
    Do you mean the quick division formulas I put in the original example? Ignore them, they won't work on the 5,000 row report I actually want this formula in, this was merely a simple example to get a suitable formula.
    Hi,

    It would have helped significantly if you had indicated that you wanted 5000 rows of formulae and not the 5 cells you coloured green and specifically mentioned.

    As Bob said there is nothing to tell a formula which currency row to use. I know of no easy way to interpret a format as a currency type and certainly not without a macro, but in any case the web table lists the names of currencies not their symbols so even if you extract the currency number format there is nothing to help convert it to a currency description.

    Does your table of 5000 rows of information not contain a currency reference of some sort which could be used with a lookup table to establish a link to the web query table?

  10. #10
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    402

    Re: Currency Conversion

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    It would have helped significantly if you had indicated that you wanted 5000 rows of formulae and not the 5 cells you coloured green and specifically mentioned.

    As Bob said there is nothing to tell a formula which currency row to use. I know of no easy way to interpret a format as a currency type and certainly not without a macro, but in any case the web table lists the names of currencies not their symbols so even if you extract the currency number format there is nothing to help convert it to a currency description.

    Does your table of 5000 rows of information not contain a currency reference of some sort which could be used with a lookup table to establish a link to the web query table?
    Ok, I have manually added in a currency reference depending on the cell formatting and then done a vlookup on this into the currency data query table.....it's a very long winded way of doing it, but if there's no other way there's no other way hey.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1