Move block of 1000 rows to new column in Excel

The output will be on a separate worksheet.

Suppose you have 10 blocks of data, these will be in range Export_Curve_03!A1:D10010.

In cell A1 of your output worksheet add the formula

=INDEX(Export_Curve_03!$A$1:$D$10010,ROW(A1)+1001*INT((COLUMN(A1)-1)/4),1+MOD(COLUMN(A1)-1,4)

Copy this formula down to row 1001 and across for sufficient columns - 40 columns in the case of 10 blocks of data so copy to range A1:AN1001.

The conversion is, presumably required just once for each set of input data, so if storage space becomes a consideration, my practice would be to change everything on the output worksheet to values using paste special.

Explanation

The INDEX function is used to pick individual cells from an array and, as used above, has general form INDEX(array,i, j) which is the value in the i´th row and j'th column of the array.

The output divides Export_Curve_03!$A$1:$D$10010 into blocks of 1001 rows with the first block in columns A-D of the output, the second in columns E-H, the third in columns I-L, etc. So a cell in the output can be matched to the input block number using the expression

INT((COLUMN(cell)-1)/4)

where cell indicates a cell reference such as A805 or X20

In fact, this expression, evaluates to 0 for a cell in columns A-D, 1 for a cell in E-H, 2 for a cell in I-L, etc. This is 1 less than the block number, which is convenient because incorporating it within the expression

ROW(cell)+1001*INT((COLUMN(cell)-1)/4)

identifies the correct row number from the input corresponding to a cell of the output.

The required column number of the input matching to a column of the output is obtained by repeating the pattern 1,2,3,4,1,2,3,4,... across the columns of the output starting with 1 in column A.

The expression

1+MOD(COLUMN(cell)-1,4)

effectively identifies the column of the input (1, 2, 3 or 4) corresponding to a cell in the output.

The two expressions for the row and the column of the input corresponding to any cell of output can now be plugged into the INDEX function and this completes the explanation.