R
R
romanovand2020-05-01 14:23:40
Parsing
romanovand, 2020-05-01 14:23:40

How to make the result of a formula fit in one cell?

When parsing H2-H3 tags, if there are several such tags on the page, their values ​​are shown in the cells below the cell with the formula (=importxml(A2;"//h2")
How to make all these values ​​automatically be in one cell?
Now this is how :
5eac075882ff6774934161.png
You need this (now I manually inserted the text instead of the formula):
5eac075ecf26e715227324.png

Spreadsheet example: https://docs.google.com/spreadsheets/d/1n_AgZbTshQ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2020-05-02
@romanovand

It's hard to say anything without an example.
More likely

=JOIN(CHAR(10);IMPORTXML("https://yandex.ru/search/?text=test";"//h2/text()"))

If the headers fit on one line, then the xPath request can be made without /text()
For your case
5ead238c24c74063282484.png
=JOIN(CHAR(10);importxml(A2;"//h2"))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question