0
votes

I'm trying to get the last value at close for the product here:

https://uk.finance.yahoo.com/quote/0P0000WN7H.L/history?p=0P0000WN7H.L

It should be returning 576.06 for today's value (26/2/2021).

I've tried using this formula in Google Sheets, which I saw recommended previously:

=IFNA(VALUE(IMPORTXML("https://finance.yahoo.com/quote/" & $A1, "//*[@class=""D(ib) Mend(20px)""]/span[1]")))

Where A1 is the ticker. However this returns 748.92, which seems to be the result from the 9/11/2020, about three months ago.

Any idea what's going wrong here and how I can get the right number?!

This is a screenshot:

This is a screenshot

1
Upon checking, it seems to return the correct data from the website/link you are using. Can you provide a screenshot of where do you see 576.06 in the website?Jason E.
Sure, I added a link. 576.06 should be returned but isn'tbooms
I've tried inspecting the element, it shows <span class="Trsdu(0.3s) Fw(b) Fz(36px) Mb(-4px) D(ib)" data-reactid="32">748.75</span>. But I still haven't found a way to put that into my IMPORTXML where it returns 748.75 (to be clear, the value has updated now, a day later)booms
Unfortunately, I cannot understand about your goal. I apologize for this. Can I ask you about the output value you currently expect?Tanaike

1 Answers

0
votes

thanks for the responses. I eventaually got what I wanted using this, with L1 being the fund ticker:

=IMPORTHTML("http://finance.yahoo.com/q/hp?s="&$L$1&"+Historical+Prices","table")

Hope that's helpful to someone else.