This used to work, how to correct it? (google spreadsheet)…
- User
This used to work, how to correct it? (google spreadsheet) =GoogleFinance("CURRENCY:USDILS")
- Assistant
It’s possible that GoogleFinance no longer supports that currency pair (USD → ILS) or is having data issues. Many users have reported that some currency conversions started failing (returning #N/A or “no data” errors) even though they worked before. Google Ayuda+2Reddit+2 Here are a few things to try / workarounds:
✅ Quick checks & fixes
Check exact syntax / quotes Make sure there are no extra spaces or mis-typed quotes, e.g. arduinoCopiar código=GOOGLEFINANCE("CURRENCY:USDILS")
(exactly like that)
- User
Feedback: The sources for the complaints are old. The currency still shows here https://www.google.com/finance/beta/quote/USD-ILS EURUSD works though Task: Provide an alternative that works not just an example
- Assistant
You're right — Google Finance still shows USD/ILS on the web, but GOOGLEFINANCE("CURRENCY:USDILS") no longer returns data in Sheets. Here’s a working alternative you can use in Google Sheets: excelCopiar código=INDEX(IMPORTXML("https://www.google.com/finance/quote/USD-ILS", "//div[@class='YMlKec fxKbKc']"),1)
This formula scrapes the live USD/ILS exchange rate directly from Google Finance.
IMPORTXML loads the page.
The XPath //div[@class='YMlKec fxKbKc'] extracts the current price element.
INDEX(...,1) ensures only the first value is returned.
Would you like me to also give you a version that works with any currency pair dynamically (e.g., =MyRate("USD","ILS"))?
- User
Make a default use in googlefinance and use this if it fails or returns an error
- Assistant
Got it ✅ — you can combine GOOGLEFINANCE with the IFERROR wrapper, so it uses the built-in function if it works, and falls back to the IMPORTXML scrape if not. Here’s the formula for USD → ILS: excelCopiar código=IFERROR( GOOGLEFINANCE("CURRENCY:USDILS"), INDEX(IMPORTXML("https://www.google.com/finance/quote/USD-ILS", "//div[@class='YMlKec fxKbKc']"),1) )
How it works:
GOOGLEFINANCE("CURRENCY:USDILS") → tries the official function first.
If it fails (#N/A or blank), IFERROR catches it and instead runs IMPORTXML to scrape the live price from Google Finance’s web page.
⚡ If you want, I can also show you a generalized version where you pass in two currencies (e.g., "USD","ILS") and it builds the fallback automatically. Want me to set that up?