Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 152
Default How to "Scrape" currency conversions off web... Maybe using Google

I have a workbook with a table of currency exchange rates shown below.
How can I write a function or macro that can extract the latest or average
exchange rate from the internet and place it in the cells that have "val"?

I think the term I've heard of is "Scraping" but that aspect of vba is new
to me.

I was thinking the easiest way would be to create a string and send it to
Google Search because if I put "Convert 1 USD to EUR" in the search bar, it
gives the me exchange rate.

Currency EUR USD JPY Baht
EUR 1.00 USD
USD val 1.00 JPY
JPY val val 1.00 Baht
Baht val val val 1.00
Thanks! MikeZz
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default How to "Scrape" currency conversions off web... Maybe using Google

Send your email to me and I will send you a workbook using an external query
to
http://finance.yahoo.com/currency/co...submit=Convert
or establish the query using the above and this macro assigned to a
button/shape
You will need defined names for [amount] 100, [to] usd, & [from] jpy
Sub ConvertCurrency()
With Sheets("Sheet1").QueryTables(1)
.Connection = _
"URL;http://finance.yahoo.com/currency/convert?amt=" _
& [amount] & "&from=" & [from] & "&to=" & [to] & "&submit=Convert"
.Refresh BackgroundQuery:=False
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MikeZz" wrote in message
...
I have a workbook with a table of currency exchange rates shown below.
How can I write a function or macro that can extract the latest or average
exchange rate from the internet and place it in the cells that have "val"?

I think the term I've heard of is "Scraping" but that aspect of vba is new
to me.

I was thinking the easiest way would be to create a string and send it to
Google Search because if I put "Convert 1 USD to EUR" in the search bar,
it
gives the me exchange rate.

Currency EUR USD JPY Baht
EUR 1.00 USD
USD val 1.00 JPY
JPY val val 1.00 Baht
Baht val val val 1.00
Thanks! MikeZz


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Default display format for "currency" data type Cynthia Excel Discussion (Misc queries) 1 June 29th 07 01:12 PM
Formating numbers &"Text" to appear as currency &"Text" in formula Robin K. Excel Discussion (Misc queries) 6 May 7th 07 02:03 PM
In Excel a cell formatted "currency" shows "######" help! llveda Excel Worksheet Functions 2 April 7th 06 09:39 PM
Changing format of column from "general" to "currency" Old Car Excel Programming 1 April 29th 05 09:49 AM


All times are GMT +1. The time now is 01:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"