Within Google Sheets, the function
=SPLIT(IMPORTXML("url here", "//title"),"|")
returns the following:
{"Linear Algebra", "School of Mathematics", "College Name", "City Name"}
which takes up 4 cells horizontally.
How do I get the first element of this array, "Linear Algebra"
?
I don't want to use FIND()
and LEFT()
, because as far as I can tell it will take XML lookups.
Any help would be appreciated.
Best Answer
Answered my own question with a little more googling: https://stackoverflow.com/questions/32307788/get-first-item-from-split
=INDEX(SPLIT(IMPORTXML("url here", "//title"),"|"),1,1)
works.