0

I am using Google Spreadsheet function. This formula works fine.

=ImportXML("https://www.google.com/finance?q=SHA:000001", "//span[@class='pr']")

The string SHA:000001 is contained in cell B4. I would like to use cell reference. So, I changed to formula to

=ImportXML("https://www.google.com/finance?q=" + B4, "//span[@class='pr']")

Unfortunately, this did not work. The value returned is #VALUE!. How should the correct formula look like?

Rubén
  • 34,714
  • 9
  • 70
  • 166
guagay_wk
  • 26,337
  • 54
  • 186
  • 295

1 Answers1

2

You need to use an ampersand not a plus sign:-

=ImportXML("https://www.google.com/finance?q="&B4, "//span[@class='pr']")
Tom Sharpe
  • 30,727
  • 5
  • 24
  • 37