Need to write a macro for importing a table from all URLs present in column A of Symbols sheet, each URL table should be written to a new sheet with the sheet being named as per the names in column B of Symbols sheet.

Using the below formula to extract table information from URL, which is working.

=IMPORTHTML(symbols!A1, "table",1)
=IMPORTHTML(symbols!A1, "table",3)

A sample sheet URL is below.

Need to customize a few rows and columns which are not required. I believe this can be done by recording a macro and copy-pasting those modification lines to macro.

Edit: I am able to achieve this in MS Excel, one click does the job of importing table, creating a new sheet, copying the table, little formatting. Want to achieve the same in googlesheets.

1 Answers

player0 On

check the INDEX and ARRAY_CONSTRAIN functions (probably also QUERY and FILTER function too) which are able to trim off the input exactly as you need to.