Google-sheets – Is it possible to use IMPORTHTML to return only certain cells

google sheetsimporthtmlworksheet-function

I'm currently using IMPORTHTML to import tables from a website that have five columns and three rows. But, I only need three cells from each of these tables. Is there a way to import just these three cells into my spreadsheet, rather than the entire table?

I could use INDEX(IMPORTHTML, but due to the number of IMPORHTML functions my spreadsheet is using, I fear it would slow it down even further than it already is if I triple that amount.

Best Answer

Pretty much possible:

=INDEX(IMPORTHTML("https://geizhals.de/?fs="&A1&"&in=";"table";0);2;3)

This one shall search for a phrase located in cell A1 and it will return data from a table 0, but only from a row 2 of that table and from a cell 3 of that row. In your case:

=INDEX(IMPORTHTML("siteurl";"TABLE";number);rownumber;cellnumber)
_________________________________________________________________

=INDEX(IMPORTHTML("siteurl";"TABLE";number);2;4)
=INDEX(IMPORTHTML("siteurl";"TABLE";number);2;5)
=INDEX(IMPORTHTML("siteurl";"TABLE";number);3;1)
  • If you are afraid of slowdown then import it into a new spreadsheet and then use IMPORTRANGE in the final spreadsheet to import it from "Google side".