Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use IMPORTXML to import from multiple URLs at one time

I have this formula =IMPORTXML(B3;"//h2"), where there is a URL in B3. I want to grab results from at least two URLs at one time, which are in B3 and B4, as I need the results in one column one after another and the number of results is unknown. Neither this:

=IMPORTXML(B3:B4;"//h2")

nor this:

=ArrayFormula(IMPORTXML(B3:B4;"//h2"))

is working.

Is there a way or trick to do that?

like image 540
Andrew Anderson Avatar asked Oct 29 '25 00:10

Andrew Anderson


1 Answers

Please try:

=query({IMPORTXML(B3;"//h2");IMPORTXML(B4;"//h2")})  

Add further terms inside the curly braces to suit.

like image 160
pnuts Avatar answered Nov 01 '25 14:11

pnuts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!