How to make a range repeat n-times in Google SpreadSheet -


i use arrayformula() simplify way create reports.

instead of having create reference in each cell (eg. =c1,=c2,=c3,=c4 in each cell, use =arrayformula(c1:c4) in 1 single cell. same job, simpler , keeps things more organized, because need in 1 cell possible errors.

it works great when have reference range take values of c1:c4 a1:a4 range. in a1 cell write =arrayformula(c1:c4) , magic.

it bit trickier when ranges not same length, feasible nonetheless. instance, if want stack 2 or more range link c1:c4 on top of b1:b3, on cell a1 can write =arrayformula({c1:c4;b1:b3}).

my problem using arrayformula() copy repeating pattern. instance, if want copy content of cell c1 4 times use =arrayformula({c1;c1;c1;c1}).

this work , achieve desired effect. however, wondering if there better way that. =arrayformula({c1}*12) pattern repeat 12 times. enable me have dynamic formula, such =arrayformula({c1}*count(d:d)) pattern repeat according variable.

do have ideia on how achieve using native formula (no javascript)?

i use split() function instead of arrayformula() , rept() function repeat cell positions. example, if n=4 formula this:

=split(rept(c1&";",4),";") 

rept() repeats cell position c1+semicolon 4 times creating string , split() function divides created string semicolons horizontal cells.

you can rotate resulted horizontal table vertical table using transpose() function:

=transpose(split(rept(c1&";",4),";")) 

and yes, can use create dynamic formulas of arrayformula() function:

=arrayformula(count(d:d)*split(rept(c1&";",4), ";")) 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -