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.

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.