Google products, especially Sheets and GAS, are my area of expertise and I have worked on multiple large scale projects. I will provide both script and formula based lightweight solutions and demonstrate the difference in performance and execution time between the two so you can choose the most suitable. Feel free to send me samples to work on if you would like to verify the above.