I've been doing a lot of work with Google Script to automate some peer evaluation processes.
One result is a spreadsheet with a lot of review data that I need to sort, group and summarize. The script is working fine for the hard-coded sort column.
But I really want to be able to sort on different columns at different times, and I'd like the sort/group/summarize script to prompt the user to select the sort/group column at runtime.
I've explored the UI stuff a bit, but I haven't seen how to prompt the user to select a range (or column or anything else) on the sheet.
Thanks in advance.
To highlight a range, click and hold down on a cell and drag the mouse or trackpad to select the desired range and release the mouse.
I know you are not supposed to post links as answers, but sometimes it just makes sense.
This answer gives a complete solution that I have not tested.
https://stackoverflow.com/a/45427670/188963
This post also describes something similar.
https://medium.com/@piyush.goel/how-to-build-a-range-picker-in-google-apps-script-to-populate-a-text-field-in-the-sidebar-in-google-6bbd4f80d4d2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With