View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Reshape in Excel

One way ..

Assuming data running in A1 down,

Put in B1:
=INDEX($A:$A,ROW(A1)*2-2+COLUMN(A1))

Copy B1 to C1, then fill down until zeros appear, signalling exhaustion of
data extracted from col A
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Claus Dethlefsen" wrote:
Dear all

I would like to reshape one long column of data into two columns, each
containing every other entry of the original column. This is known as
"reshaping" from "long" format to "wide" format in statistics programs such
as Stata and R. But I would like to be able to do it directly in Excel.

To illustrate:

The long column:

1
2
3
4
5
6
etc.

is reshaped into the two columns:

1 2
3 4
5 6
etc.


Could someone help with directions on doing this in Excel?

Best regards,

Claus

--
Claus Dethlefsen, MSc, PhD
Biostatistician at Center for Cardiovascular Research

Aalborg Hospital Science and Innovation Center
Aalborg Hospital
Sdr Skovvej 15
DK-9000 Aalborg
Denmark