Convert column to array?

J

James Silverton

Some of the discussion on unique integers made me try to think
of a method to convert a column to an array. I could not come up
with any easy method. A Google search produced
http://www.cpearson.com/excel/excelF.htm , where there was a VBA
method to do the reverse: convert an array to a column. I
suppose I could adapt the method for what I want but, not
wanting to reinvent the wheel, has anyone any good suggestions?

James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.comcast.not
 
V

vezerid

James,
what do you mean exactly? Generating an array constant from a range? Or
take a 1-dimensional array and create a 2-dimensional from this?

HTH
Kostis Vezerides
 
J

James Silverton

vezerid said:
James,
what do you mean exactly? Generating an array constant from a
range? Or
take a 1-dimensional array and create a 2-dimensional from
this?

HTH
Kostis Vezerides

Thanks for the quick feed-back! It's the latter; I was using
column and 1-d array as synonyms.
 
V

vezerid

OK then, say your 1D is in A1:A12, and also say that you want to
produce a 4row-3col output. We are interested in the number 3. If your
2D starts at C1 then use the following formula:

=INDEX($A$1:$A$12,(ROW()-ROW($C$1))*3+COLUMN()-COLUMN($C$1)+1)

HTH
Kostis
 
J

James Silverton

Hello, vezerid!
You wrote on 26 Jan 2007 09:22:38 -0800:

v> =INDEX($A$1:$A$12,(ROW()-ROW($C$1))*3+COLUMN()-COLUMN($C$1)+
v> 1)

v> HTH
v> Kostis

Thanks very much Kostis! That does the job smoothly for a 3
column array. I had a suspicion that INDEX might be involved but
I was not very familiar with the function.

Incidentally, the method can readily be adapted for producing an
array of unique integers as was asked earlier by someone else
since producing a column of unique integers is easy.

James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.comcast.not
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Pivot Tables 3
Investigate inherited formatting. 4
Randomizing 3
Mysteries on msnews. 2
Histogram 4
how do u make a freytag pyramid 3
Can Excel solve matrices? 1
Determinant of a matrix. 2

Top