Use Google Apps Script (GAS) to update the cell where Column name and Row name matches the provided values.
The function produces the desired result on the sheet
=query(dataset, "select sum(C) where A='"&A2&"' and B='"&B1&"' label sum(C) ''")
But the sheet becomes very slow as this function has to be put in thousands of cells. Is there a more efficient function than this? I want to do the same using GAS.
The data looks something like this :










