1 of 6

Trigger function when IMPORTRANGE() is updated

I have a sheet (sheet-A) that gets it's information from another sheet (sheet-B) using IMPORTRANGE(). In sheet-B I have a function that formats cells based on the a value in the row. At the moment I run this function on a timer because IMPORTRANGE() does not trigger an OnEdit or OnChange events.

I am wondering if there is some other mechanism to trigger an event on sheet-B from sheet-A so that I can run the function on demand and not every minute. During some times I may need to run the function every few seconds, and I'd like to keep the formatting somewhat interactive, other times the sheet may not be in use for weeks and I don't need to run the function every minute.

Thanks!