#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Reshape in Excel

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

  #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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop excel from dropping the 0 in the beginning of a number? Rosewood Setting up and Configuration of Excel 12 April 4th 23 02:12 PM
Open Excel 2003 from Windows Explorer pmpjr Excel Discussion (Misc queries) 9 September 11th 06 03:58 PM
Need suggestions for some uses of Ms Excel Bible John Excel Discussion (Misc queries) 1 February 27th 06 05:30 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Excel 2002 and 2000 co-install. Control Which Starts ? cnuk Excel Discussion (Misc queries) 2 January 17th 05 08:07 PM


All times are GMT +1. The time now is 03:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"