What I would like to do is be able to run the script and have it create four new sheets (within the current sheet I'm in) with the following formatting in each:
1st row frozen with column headings on Column A, B, C, D, and F.
A formula in E2 (=D2*100) that would be copied all the way to E30
I want to also do some other formatting but if I see the script for the top two I can hopefully learn enough to do the rest on my own. Right now I have started to write a script that uses the insertSheet
command to create the sheets but I am stuck at that point.
Best Answer
Here is the script that does what you described. The formulas are prepared in a double array
formulas
ahead of time. Then, each new sheet gets one frozen row, columns headings, and formulas.However it's easier to use
arrayformula
command that deals with all multiplications at once:=arrayformula(D2:D30*100)
. Then the script is shorter: