Convert currency using particular date

Hi, I wish to convert a cell that contains a USD value to another currency, AUD value. I'd like to use the date in another cell in the row to be the date that the conversion is calculated, if possible. I played around with the CURRENCY formula, but can't get it to work.


In the screenshot, the source cell for conversion is F2, looking to calculate the AUD value into G2, with the date of conversion being A2.


User uploaded file


F2 and G2 are currently simply formatted as 'number'.


Is this possible somehow? (I've seen it done in Google sheets, pulling data from a server, but not sure if it is possible to do it on a fixed date, or only the current or most recent date.) Thanks

MacBook Pro (15-inch Mid 2012), macOS Sierra (10.12.4), SSD, Optical Drive swapped for HD

Posted on Oct 31, 2017 1:15 AM

Reply
9 replies

Nov 1, 2017 8:48 AM in response to JDfunky

It's worth studying how Apple approached the problem in the 'My Stocks' template (at File > New in your menu).


User uploaded file



The formula inserts a "-" for the errors on the weekend days. Then a filter on "text is not -" hides those rows.


When the filter is active (the box in the panel at the right is checked by default) the table and chart look like this:


User uploaded file



This approach, of course, will work equally well for CURRENCYH()


SG

Nov 1, 2017 5:41 AM in response to JDfunky

Ok so I've worked out I need to use the CURRENCYH function. I've got it working, except for dates that are weekends, I get an error for those. Can it really be that the function can't get data for the weekend days? Even if it's based on Yahoo data for stocks which only provides 5 days of the week, wouldn't it just go back to the Friday before and use that close? Amazing if so!


User uploaded file

Jan 1, 2018 6:01 AM in response to stfflspl

Hi Paul,


Partial overlaps only, unless one somehow wants to argue that the world has moved beyond a 24-hour clock and there is more than one international date line.🙂


No weekend quotes on Yahoo! That is quite understandable, and the behavior I would expect. In any case, it's a simple matter to use a filter to hide the dates where =CURRENCYH does not return a meaningful result, as in the 'My Stocks' template, as explained in my previous reply.


SG

Jan 1, 2018 2:56 PM in response to SGIII

It's not forex currency, it's crypto currency that I trade, markets never close. These trades in question were ones that I placed myself, on Saturdays or Sundays, hence why I need a closing price to calculate the USD equivalent on that day. It would appear that Yahoo have not yet caught up.


My current workaround is to manually go through the sheet and insert "[date cell reference] -1" if a Saturday trade, "[date cell reference]-2" if a Sunday trade, to use the Friday data. Hopefully the tax department will be happy enough with this estimation for now, and eventually Yahoo will provide weekend data as more and more people request it.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Convert currency using particular date

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.