abaker77
New member
- Joined
- Oct 11, 2011
- Messages
- 5
- Reaction score
- 0
- Points
- 0
- Location
- Toronto, Canada
- Website
- www.jkjl.com
- Excel Version(s)
- Office 365
Hello,
I have a worksheet with a single column of items, e.g. item001 - item100.
The number of items in this single column could vary, anywhere from 10 to 500 items.
The objective is to split that column into multiple columns.
I can't use Text-to-columns because there's no delimiter and I'm not splitting the item descriptions at all.
I was hoping there was a way that Power Query could do the trick without too much complication.
To illustrate, if I had 100 items and wanted to split it into 5 columns of 20 rows each, the resulting 5 columns should start with:
item001, item021, item041, item061, item081
The numer of split columns and rows might vary, e.g. instead of 5 columns of 20 rows, I might need 3 columns of 33 rows (with 1 spilling into a 4th column.)
I believe I can do this with a formula, for instance:
my original column starts in A6 (for 400 items) and I want to start my split in cell C6, and the # of rows I want in each column = num_rows
=INDEX($A$6:$A$406,ROW(C6)-5+(num_rows*(COLUMNS($C$6:C$6)-1)))
This formula apparently works but I have to subtract 5 (since I'm starting on row6) *and* I have to replicate the formula manually just num_rows down and to the right enough to accommodate all my items.
I have attached a simple worksheet to illustrate what I'm trying to achieve.
THANK YOU !
I have a worksheet with a single column of items, e.g. item001 - item100.
The number of items in this single column could vary, anywhere from 10 to 500 items.
The objective is to split that column into multiple columns.
I can't use Text-to-columns because there's no delimiter and I'm not splitting the item descriptions at all.
I was hoping there was a way that Power Query could do the trick without too much complication.
To illustrate, if I had 100 items and wanted to split it into 5 columns of 20 rows each, the resulting 5 columns should start with:
item001, item021, item041, item061, item081
The numer of split columns and rows might vary, e.g. instead of 5 columns of 20 rows, I might need 3 columns of 33 rows (with 1 spilling into a 4th column.)
I believe I can do this with a formula, for instance:
my original column starts in A6 (for 400 items) and I want to start my split in cell C6, and the # of rows I want in each column = num_rows
=INDEX($A$6:$A$406,ROW(C6)-5+(num_rows*(COLUMNS($C$6:C$6)-1)))
This formula apparently works but I have to subtract 5 (since I'm starting on row6) *and* I have to replicate the formula manually just num_rows down and to the right enough to accommodate all my items.
I have attached a simple worksheet to illustrate what I'm trying to achieve.
THANK YOU !