I'm trying to use ImportXML in Google Sheets to pull URL and anchor of link containing the string. Problem is that I want to avoid having string hardcoded and want it to be pulled from another cell.
Hardcoded example:
=IMPORTXML("http://www.debian.org/mirror/list", "//a/@href[contains(., 'about')]")
Desired outcome (using A2 instead of about):
=IMPORTXML("http://www.debian.org/mirror/list", "//a/@href[contains(., A2)]")
I tried putting A2 in quotes but that didn't work.
Please try:
=IMPORTXML("http://www.debian.org/mirror/list", "//a/@href[contains(.,'"&A2&"' )]")
ie single quotes (as before) around double quotes around &
s.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With