Home > Enterprise >  How to concatenate the same array 'X' times without VBA using VLOOKUP
How to concatenate the same array 'X' times without VBA using VLOOKUP

Time:11-04

I'm trying to create an array that repeats a sequence of numbers 'X' times. Here's what I have so far. (Avoiding VBA).

=VSTACK(SEQUENCE(C1,1), SEQUENCE(C1,1))

To which I get:

Column A B (times) C (rows)
1 2 3
2
3
1
2
3

But how do I repeat SEQUENCE(C1,1) 'X' times inside VSTACK based on what is inside B2?

I've thought about REPT, but that only works for strings

Thank you!

CodePudding user response:

You could use:

=tocol(mod(sequence(c1,b1)-1,c1) 1)

CodePudding user response:

You can use this formula: =MAP(SEQUENCE(B1*C1,1,0,1),LAMBDA(a,MOD(a,C1) 1))

  • Related