Google Sheets Query – Overwrite Cell Value Based on New Criteria

google-sheets-query

=query(CASES,"select C,E,F,G,H,I,J,K,L,P,Q,R where Q matches 'Admission|Pending|Transferred' AND R is null ORDER BY R ASC ",0)

I use this formula to filter data to a sheet. Then I want to change the value of a column N based on a criteria.. which is (IF cell M2="Yes", then the value of the column N will be changed to "IM" instead of the query result). In other words, to overwrite the result of query according to a specific criteria
enter image description here

But it seems the cell can't be changed due to the query function that is being applied.

Notes: the criteria I mentioned refers to G2 of the current sheet that has the result of query function.

Best Answer

It seems you can't change query results or edit cells.