Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Re-Arranging a Block of Data

Was wondering if there is a simple way to re-arrange data with some VB code.
I have much more data than in the following example.
So this could actually save several hours of work.

Thanks in advance, Mark

Have data in this format:

BOB DAVE JIM HAROLD
1 33 31 15
19 23 22 99

I need it in this format:

BOB
1
19
DAVE
33
23
JIM
31
22
HAROLD
15
99
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Re-Arranging a Block of Data

a formula would work just a nicely

=OFFSET(Sheet1!$A$1,MOD(ROW(),3),INT(ROW()/3))

copy down then copy /pastespecial values



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


(Mark) wrote:

Was wondering if there is a simple way to re-arrange data with some VB
code. I have much more data than in the following example.
So this could actually save several hours of work.

Thanks in advance, Mark

Have data in this format:

BOB DAVE JIM HAROLD
1 33 31 15
19 23 22 99

I need it in this format:

BOB
1
19
DAVE
33
23
JIM
31
22
HAROLD
15
99


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Re-Arranging a Block of Data

If the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook:

=ArrayReshape(A1:D3,12,1,1) array entered into a 12-cell column

Alan Beban

Mark wrote:
Was wondering if there is a simple way to re-arrange data with some VB code.
I have much more data than in the following example.
So this could actually save several hours of work.

Thanks in advance, Mark

Have data in this format:

BOB DAVE JIM HAROLD
1 33 31 15
19 23 22 99

I need it in this format:

BOB
1
19
DAVE
33
23
JIM
31
22
HAROLD
15
99


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Re-Arranging a Block of Data

Thanks. That is so simple and cool. You don't have to understand
gravity to enjoy it!

I would like to know why the formula doesn't return the contents of cell
A1. It looks like it starts with A2.

Mark Roach
Technical Resources Manager
The Oil & Gas Asset Clearinghouse
Houston, Texas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Re-Arranging a Block of Data

=OFFSET(Sheet1!$A$1,MOD(ROW(),3),INT(ROW()/3))

the offset has to start somewhere and you cant up or left from a1 :)
row counts are 1 based, so I should have made a small adjustment

=OFFSET(Sheet1!$A$1;MOD(ROW()-1;3);INT((ROW()-1)/3))

cheerz!

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


Mark Roach wrote:

Thanks. That is so simple and cool. You don't have to understand
gravity to enjoy it!

I would like to know why the formula doesn't return the contents of cell
A1. It looks like it starts with A2.

Mark Roach
Technical Resources Manager
The Oil & Gas Asset Clearinghouse
Houston, Texas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


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
Arranging a data in required format Vai_Maha Excel Discussion (Misc queries) 3 January 3rd 10 06:05 PM
re-arranging the data Lan Excel Discussion (Misc queries) 2 August 16th 06 04:52 PM
Help Arranging Data on Spreadsheet [email protected] Excel Discussion (Misc queries) 2 May 13th 06 11:36 PM
Arranging Excel Data Matt M Excel Discussion (Misc queries) 1 January 19th 06 03:43 AM
ARRANGING DATA IN PIVOT TABLES [email protected] Excel Worksheet Functions 1 September 20th 05 10:18 AM


All times are GMT +1. The time now is 11:35 PM.

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

About Us

"It's about Microsoft Excel"