ss.getActiveRange() selects the currently selected or edited range. From reading your script I see you meant the entire range of data, which would be ss.getDataRange(). Other than that, the logic is okay. Other suggestions: Don't use methods when unnecessary, you get time and tablet that are never used. Consider getting all relevant values in one ...
Top 50 recent answers are included