Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Array to single column

I'm sure this has been discuss before, but It was not quite what I
want to do, I want to go from

A D G J M
B E H K N
C F I L O to

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O

newbie excel user, TIA
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Array to single column

Dan,

Use this formula in a cell

=INDEX($A$1:$E$5,MOD(ROW()-ROW($A$7)-1,ROWS($A$1:$E$5))+1,INT((ROW()-ROW($A$7)-1)/COLUMNS($A$1:$E$5))+1)

Watch the line wrapping.... Replace the three instances of $A$1:$E$5 with the address of the block
of data, replace the two instances of $A$7 with the address of the cell one row above where you
place this formula (both should be in absolute style - with the $ $ ) and then copy down until you
get an error.

HTH,
Bernie
MS Excel MVP


wrote in message
...
I'm sure this has been discuss before, but It was not quite what I
want to do, I want to go from

A D G J M
B E H K N
C F I L O to

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O

newbie excel user, TIA



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Array to single column

If you can use a macro, this will **move** the contents of whatever is range
is selected from a rectangular array of values to a linear column of values
(preserving the first column of the selection)...

Sub ListSelection()
Dim X As Long
Dim NumRows As Long
Dim NumCols As Long
NumRows = Selection.Rows.Count
NumCols = Selection.Columns.Count
For X = 1 To NumCols - 1
Selection(1).Offset(NumRows * X, 0).Resize(NumRows, 1).Value= _
Selection(X + 1).Resize(NumRows, 1).Value
Next
Selection(1).Offset(0, 1).Resize(NumRows, NumCols - 1).Clear
End Sub

If there are formulas involved in your selection array, then change the two
occurrences of "Value" to "Formula".

Rick


wrote in message
...
I'm sure this has been discuss before, but It was not quite what I
want to do, I want to go from

A D G J M
B E H K N
C F I L O to

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O

newbie excel user, TIA


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Array to single column

Another one:

Assume your data is in the range E1:I3

Assume you want the data extracted starting in cell A1.

Enter this formula in A1 and copy down until you get a contiguous return of
0s:

=OFFSET(E$1,MOD(ROWS($A$1:A1)-1,3),INT((ROWS($A$1:A1)-1)/3))

Where 3 = number of rows in your table.

Or, assuming there are no empty cells within the table, this version will
return blanks once you've extracted all the data:

=IF(ROWS(A$1:A1)<=COUNTA(E$1:I$3),OFFSET(E$1,MOD(R OWS($A$1:A1)-1,3),INT((ROWS($A$1:A1)-1)/3)),"")

Or, this version calculates the number of rows in the table:

=IF(ROWS(A$1:A1)<=COUNTA(E$1:I$3),OFFSET(E$1,MOD(R OWS($A$1:A1)-1,ROWS(E$1:I$3)),INT((ROWS($A$1:A1)-1)/ROWS(E$1:I$3))),"")

Or, if you have the Morefunc.xll add-in from http://xcell05.free.fr/english/
then this array formula** entered in A1 and copied down:

=INDEX(ARRAY.JOIN(TRANSPOSE(E$1:I$3)),ROWS(A$1:A1) )

With an error trap:

=IF(ROWS(A$1:A1)<=COUNTA(E$1:I$3),INDEX(ARRAY.JOIN (TRANSPOSE(E$1:I$3)),ROWS(A$1:A1)),"")



--
Biff
Microsoft Excel MVP


wrote in message
...
I'm sure this has been discuss before, but It was not quite what I
want to do, I want to go from

A D G J M
B E H K N
C F I L O to

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O

newbie excel user, TIA



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
From single cell variables to a single column serie noyau New Users to Excel 1 December 22nd 06 06:43 AM
Converting an array of data into a single column Raj Excel Discussion (Misc queries) 0 August 15th 06 09:21 PM
Creating a single vertical array from multiple column arrays Bryan Excel Worksheet Functions 2 December 10th 05 07:12 PM
Filling excel entire row/column instead of single cell from an array shitij Excel Worksheet Functions 3 July 13th 05 07:44 AM
Coverting array data into single column dgarg Excel Worksheet Functions 4 December 15th 04 07:43 AM


All times are GMT +1. The time now is 11:10 AM.

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"