Home > Net >  Split one column in two in Excel (one column has all rows from both columns)
Split one column in two in Excel (one column has all rows from both columns)

Time:10-12

I've queried some data and the output is copied as one column, so 1 single column like:

Column1
Column2
DataColumn1_value1
DataColumn2_value1
DataColumn1_value2
DataColumn2_value2
DataColumn1_value3
DataColumn2_value3

So that's the format I'm getting in Excel, I don't have any delimiter. What would be the best way to convert that into columns so it looks like a proper table

Column 1               Column 2
DataColumn1_Value 1    DataColumn2_Value 1
DataColumn1_Value 2    DataColumn2_Value 2
DataColumn1_Value 3    DataColumn2_Value 3

CodePudding user response:

Try this: Column 1

=INDEX(A:A,ROW()*2-1)

Column 2

=INDEX(A:A,ROW()*2)

Hope it helps.

CodePudding user response:

Assuming that your data starts from cell A1:

Put this in column B, starting at cell B1 and drag down:

=INDIRECT(ADDRESS(CEILING(2*ROW()-1), 1))

Put this in column C, starting at cell C1 and drag down:

=INDIRECT(ADDRESS(CEILING(2*ROW()), 1))

Result:

enter image description here

After that, if you needed to move the data around you could copy as value and go from there!

CodePudding user response:

Try:

enter image description here

Formula in C1:

=WRAPROWS(A1:A8,2)
  • Related