Aşağıda TRY, USD ve EUR için örnek bir VBA Makrosu var. Kendinize göre düzenleyerek bu makro ile API sayesinde güncel kurları çekerek yazdırabilirsiniz.
Sub UpdateExchangeRates()
Dim url As String
Dim xmlhttp As Object
Dim json As Object
Dim rates As Object
Dim baseCurrency As String
Dim targetCurrencies As Variant
Dim cell As Range
' API'ye bağlanacak URL
url = "API_URL"
' HTTP isteği oluştur
Set xmlhttp = CreateObject("MSXML2.XMLHTTP")
xmlhttp.Open "GET", url, False
xmlhttp.send
' JSON verilerini al
Set json = JsonConverter.ParseJson(xmlhttp.responseText)
' API'den alınan verileri işle
Set rates = json("rates")
baseCurrency = json("base")
targetCurrencies = Array("USD", "EUR", "TRY")
' Hücreleri güncelle
For Each cell In Sheets("Sheet1").Range("B2:B4") ' Tarihlerin bulunduğu sütun
For i = LBound(targetCurrencies) To UBound(targetCurrencies)
Sheets("Sheet1").Cells(cell.Row, cell.Column + i).Value = rates(targetCurrencies(i)) / rates(baseCurrency)
Next i
Next cell
' Temizlik yap
Set xmlhttp = Nothing
Set json = Nothing
Set rates = Nothing
End Sub