0

as in the title. I have a script that returns the built-in google sheets filter criterion. I tried to make a trigger so that the script executes every time I change the filter criteria. It looks like this: =myscript(A1) - In cell A1, I have a =SUBTOTAL() function as a trigger that returns a different number to the cell each time I change the filter criteria. Unfortunately, =myscript(A1) returns #Error! (without any description) after changing the value in cell A1. But when I change the value of cell A1 manually everything works and myscript() is executed. What do you think about it?

2
  • Can you post the code you are using as well? What kind of trigger do you have? @AdOne Commented Dec 16, 2020 at 9:18
  • @ale13 I found a different solution. Instead of code, I used a function. VLOOKUP(SUBTOTAL(104,A:A),A:C,3,false) In column A, I added unique numbers for each row, and there is a filter in column C. It works for one criterion Commented Jan 6, 2021 at 17:54

1 Answer 1

1

This is taken directly from the documentation on simple triggers:

onEdit(e) runs when a user changes a value in a spreadsheet.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, this trigger unfortunately doesn't run when the filter criteria changes, but already found another solution.
There is no trigger that fires when data changes on the spreadsheet due to script or formula actions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.