Forum Discussion
fakewen
Apr 24, 2023Copper Contributor
What's the easiest way to split a list into a specific number of rows and columns?
For example I have a column with the numbers 1-20, and I want to split it into 3 rows by 4 columns, then the reminder of the rows with 3 columns, while maintaining a horizontal order: 1 2 3 ...
Lorenzo
Apr 24, 2023Silver Contributor
Assuming you run 365 (cf. Welcome to your Excel discussion space!) and your values are in A1:A20, one way:
=LET(
range, A1:A20,
IFERROR(
VSTACK(
INDEX(range, SEQUENCE(3,4)),
INDEX(range, SEQUENCE(ROUNDUP((ROWS(range)-12)/3,0),3,13))
),
""
)
)