'newRichTextValue() after query

After apply query I want to change some text color via app script, but my query show this error because I changed data, any ways to solve? To format I used newRichTextValue()

Ty!



Solution 1:[1]

As @player0 mentioned when using Query you need to have free cells depending on the range that your formula will use, otherwise this error will appear:

"Array result was not expanded because it would overwrite data in #range#."

Solution can be either delete the conflicting cell with your query or move the query to a blank row so it can retrieve the data from your query.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1