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.

https://docs.google.com/spreadsheets/d/1uJPjfAZLRCwafetbH4-nPJPSpTvvgixlFvGG6gYITBU/edit?usp=sharing

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

0
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.