'#REF! error in data from Importxml (Google Sheets Xpath/Formula)
This is my first question here, so please be kind! I'm sure this is quite novice, but here goes:
I am using Importxml to pull some data from a website. Generally everything is fine, but it certain cells the data requires an additional cell and I am presented with a #REF! error reading "Array result was not expanded because it would overwrite data in.." I simply don't understand how to fix it. How do I edit my Importxml formula to remedy this? Or is it the Xpath that needs a fix?
Here is a Sheet I made with the url, xpath, error in question: REF Error in Importxml
I hope everything is pretty clear and explanatory and, most of all, a simple fix. Thanks everyone for humouring this old fool!
Solution 1:[1]
you can wrap it into INDEX an request a specific cell. for example:
=INDEX(IMPORTXML(B8, C27), 1, 1)
in your case it would be:
=INDEX(TRANSPOSE(IMPORTXML(B8, C27)), 1, )
update:
see B2 and D2 cells
=ARRAYFORMULA(IFNA(VLOOKUP(
{"Artist", "Release", "Format", "Released", "Country", "Style", "Last Sold", "Highest"},
TRIM(SPLIT(FLATTEN(SPLIT(SUBSTITUTE(SUBSTITUTE("Artist:"&QUERY(REGEXREPLACE(TO_TEXT(FLATTEN(
IMPORTXML(B2, "//div[@class='profile']/*|//div[@class='section_content toggle_section_content']/ul/li"))),
"(.*:)", "¤$1"),,9^9)," ?– ", "¤Release:", 1), "*",, 1), "¤")), ":")), 2, 0)))
demo spreadsheet
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |

