I have a Google Script running in Google Sheets that assigns a value to the current cell. As part of the script, I want to validate that the current cell is part of a particular named range, as the script should only be run when in that area.
I can't find any API methods to validate whether a cell belongs to a range, or more generally, whether one range is encompassed by another. How do I do this? Do I need to write the algorithm manually?