0

Issue:

I have a Google Form, let's call it "Stock". The form simply records new entries of stock into the Google Sheet "Stock Form Responses". In this sheet, there is a field called Stock Number which has to be unique. In order to cut out human error in the process of assigning a new stock number to the rows of data added through the form, I have created a very simple formula in a cell:

=max('Stock Form Responses'!B:B)+1

This does exactly what I need it to do, and tells me the latest stock number, and adds one to it, ready for the next addition via the form. I then use this code in another cell (G9 of the sheet called "Control"), to pass that number to the prefilled form link for my form, like this:

=concatenate("https://docs.google.com/forms/MYFORMLINK/viewform?usp=pp_url&entry.465281926=",D10)

This is where D10 from the Control sheet stores the previous calculation of what the next stock number should be.

All of this works great so far, and everything works fine.

Problem:

Google Sheets has this really annoying feature where you can't just click a link in the sheet, you have to hover over it and then click the attached link. It's frustrating, and I'm trying to simplify and clean up steps. I simply want to pass the URL stored in G9 to an action attached to a button, let's call it AddStock. How do I do this?

I've been trawling the internet for hours trying to work it out, and can't seem to figure it out myself (admittedly I have very limited coding understanding, but people keep talking about popup blockers, etc).

  • Does this answer your question? [Google Apps Script to open a URL](https://stackoverflow.com/questions/10744760/google-apps-script-to-open-a-url) – CMB Mar 29 '21 at 21:25
  • Buttons can execute scripts, but Google Apps Script has no access to your browser. The best it can do is show an html with a clickable link: https://stackoverflow.com/questions/10744760/google-apps-script-to-open-a-url – CMB Mar 29 '21 at 21:27

0 Answers0