Home > Blockchain >  Repeat multiple columns
Repeat multiple columns

Time:06-22

How to implement multiple column repetition using formulas? Here is my enter image description here

CodePudding user response:

try:

={OFFSET(A1:C;;;COUNTA(A1:A));
  OFFSET(A1:C;;;COUNTA(A1:A));
  OFFSET(A1:C;;;COUNTA(A1:A));
  OFFSET(A1:C;;;COUNTA(A1:A));
  OFFSET(A1:C;;;COUNTA(A1:A))}

CodePudding user response:

Another way, number of reps in D1, number of rows and columns in range to be copied can vary:

=ArrayFormula(vlookup(
mod(quotient(sequence(D1*rows(A1:C5),columns(A1:C5),0),columns(A1:C5)),rows(A1:C5)) 1,
{row(A1:C5),A1:C5},
mod(sequence(D1*rows(A1:C5),columns(A1:C5),0),columns(A1:C5)) 2))

enter image description here

For your locale:

=ArrayFormula(vlookup(
mod(quotient(sequence(P1*rows(A1:C5);columns(A1:C5);0);columns(A1:C5));rows(A1:C5)) 1;
{row(A1:C5)\A1:C5};
mod(sequence(P1*rows(A1:C5);columns(A1:C5);0);columns(A1:C5)) 2))
  • Related