Best way to implement excel-like functionality with functions

Hi @jake_chambers12

If we could look at the code it would be simpler.
Can you share a JS playground demo (JSFiddle, CodePen, StackBlitz)?