Pergunta

I have a Google Sheets spreadsheet with two sheets/tabs - let's call them Products and Parts.

The Products sheet/tab contains a list of products, one product per row, with various properties recorded across several columns. The name of each product is stored in column A and is unique.

The Parts sheet/tab contains a list of the parts which make up each product, where there could be one, none or many parts per product and there is one row per part. Again, several properties of the parts are recorded across the columns and the name of the product to which each part belongs is stored in column B. I already have a Filter applied to this sheet/tab to allow the end user to filter the rows displayed.

My question is this: Is there a way for me to allow a user to click a product name in column A of the Products sheet/tab and have Google Sheets take them to the Parts sheet/tab AND filter the rows shown on that tab to only display rows where the Product name in column B of the Parts tab is equal to the Product name in column A of the Products tab which they clicked?

I know that I can easily add HYPERLINK formulae to the cells in column A of the Products sheet/tab to cause the Parts sheet/tab to open, but it's getting the filtering to happen as well which is causing me trouble and I can't find anything similar online.

I have some experience with Google Scripts, but am by no means an expert. Am happy to take whatever suggestions you guys might have though and give them a go, so any help would be greatly appreciated!

If there is any further information or clarification needed in order to answer my query, don't hesitate to let me know!

Thanks.

Foi útil?

Solução

Write an apps script. Create a menu on onOpen. Call script from the menu. The script will get the selected cell, do the sheet nscigation and filtering.

Its not possible to trigger a script on cell click.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top