I have the following code which extracts a webpage to excel. However, the price is a mix of Euros, Pounds and dollars, how do I identify what currency these are to allow a conversion?
Code:
Sub Extract()
Dim USD As Long
Dim EUR As Long
Dim GBP As Long
Dim MaxSale As Currency
Dim MinSale As Currency
Dim AvgSale As Currency
Dim theRange As Range
Set theRange = Range("d:d")
EUR = 0.677861 ' Set exchange rates for your country - your own currency should equal 1
USD = 0.497392 ' Set exchange rates for your country - your own currency should equal 1
GBP = 1 ' Set exchange rates for your country - your own currency should equal 1
Worksheets("Test Sheet").Activate
Range("A:z").Select
Selection.ClearContents
With ActiveSheet.QueryTables.Add(Connection:="URL;[URL unfurl="true"]http://www.discogs.com/sell/list?release_id=82871",[/URL] _
Destination:=Range("a1")) 'write web-page to sheet
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
MaxSale = Application.Max(theRange)
MinSale = Application.Min(theRange)
AvgSale = Application.Average(theRange)
MsgBox MaxSale & " " & MinSale & " " & AvgSale
End Sub