1

Is there any way populate a cell in a Google sheet based on the value in the URL?

For example: If the hyperlink below was on sheetA and the link was clicked. Is there any way to get ?cell=english into a cell in sheetB?

=HYPERLINK("#gid=2018939279?cell=english","English")
2
+25

The event of someone clicking a hyperlink embedded in a spreadsheet is not visible to the spreadsheet itself. It cannot trigger any changes. (Unless the link is to some web application which is programmed to modify the spreadsheet).

As for extracting the URL from a cell with =hyperlink formula - this can't be done with built-in Sheets functions, but there is a custom function (implemented in Google Apps Script) which does that: see Extract the link text and URL from a hyperlinked cell.

0

this is not possible to do so on click-event, but it can be faked to some degree:

  • cell SheetA!A1: insert custom checkbox via data validation
  • cell SheetA!B1: =IF(A1=1, HYPERLINK("https://www.themoviedb.org/", "English"), )
  • cell SheetA!C1: =IF(B1<>"", HYPERLINK("https://www.themoviedb.org/"), )
  • cell SheetB!A1: =INDIRECT("SheetA!C1")

1

2

3

4

the other approach would be to mask that link via URL shortener like https://bitly.com/ and scrape click-count via IMPORTXML() and then use simple IF() statement in a way:
IF(IMPORTXML(imported click-count)>2(click-counts), INDIRECT("SheetA!C1"), )
to detect ocured click and fill cell SheetB!A1 - the only downside is that it's just one time trigger detector.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.