Forum Discussion
ElRafaVaz33
May 20, 2022Copper Contributor
Creating a dynamic repeating sequence of arrays
Hi Excel community, I'm trying to find a way to create a dynamic array of repeating cells. I was attempting a similar technique on Google Sheets where you can use a Rept and TextJoin to create a ...
- May 20, 2022
ElRafaVaz33 There are lots of possibilities. Here is one:
=LET(in,F1:F6,rep,G1,s,SEQUENCE(ROWS(in)*rep,1,0),INDEX(in,QUOTIENT(s,rep)+1))
OliverScheurich
May 20, 2022Gold Contributor
Sub names_array()
Dim i As Integer
Dim lngzeilemax As Integer
Dim z As Integer
Dim y As Integer
With Tabelle1
lngzeilemax = .Range("B" & .Rows.Count).End(xlUp).Row
For i = 3 To lngzeilemax * Cells(1, 2).Value
For z = 1 To Cells(1, 2).Value
Cells(z + y, 3).Value = Cells(i, 2).Value
Next z
y = y + Cells(1, 2).Value
Next i
End With
End Sub
Maybe with this code. You can click the button in cell E2 in the attached file to start the macro.