Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Converting a matrix of data into a single column

Hi there,

I want to take a matrix of data (e.g. 89 columns wide and 89 rows
wide), and order it all into one single column, where they data
currently in column B would follow all of the data currently in column
A, and so on. Currently I am simply cutting and pasting. Is there an
easier way to do this? I've tried making a macro for it but the one
made doesn't work. Any ideas?


Thanks,

Hos

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Converting a matrix of data into a single column

See this:

http://tinyurl.com/2z6gmc

You can probably figure out how to adjust it to work for you.

Biff

"Hosley" wrote in message
oups.com...
Hi there,

I want to take a matrix of data (e.g. 89 columns wide and 89 rows
wide), and order it all into one single column, where they data
currently in column B would follow all of the data currently in column
A, and so on. Currently I am simply cutting and pasting. Is there an
easier way to do this? I've tried making a macro for it but the one
made doesn't work. Any ideas?


Thanks,

Hos



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 145
Default Converting a matrix of data into a single column

Dim rng As Range
For i = 2 To 89
Set rng = Range(Cells(1, i), Cells(1, i).End(xlDown))
rng.Cut Cells(Rows.Count, 1).End(xlUp)(2)
Next i

--
Regards
PY & Associates

"Hosley" wrote in message
oups.com...
Hi there,

I want to take a matrix of data (e.g. 89 columns wide and 89 rows
wide), and order it all into one single column, where they data
currently in column B would follow all of the data currently in column
A, and so on. Currently I am simply cutting and pasting. Is there an
easier way to do this? I've tried making a macro for it but the one
made doesn't work. Any ideas?


Thanks,

Hos



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 145
Default Converting a matrix of data into a single column

Dim rng As Range
For i = 2 To 89
Set rng = Range(Cells(1, i), Cells(1, i).End(xlDown))
rng.Cut Cells(Rows.Count, 1).End(xlUp)(2)
Next i

--
Regards
PY & Associates

"Hosley" wrote in message
oups.com...
Hi there,

I want to take a matrix of data (e.g. 89 columns wide and 89 rows
wide), and order it all into one single column, where they data
currently in column B would follow all of the data currently in column
A, and so on. Currently I am simply cutting and pasting. Is there an
easier way to do this? I've tried making a macro for it but the one
made doesn't work. Any ideas?


Thanks,

Hos



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Converting a matrix of data into a single column

On Apr 18, 10:58 pm, "T. Valko" wrote:
See this:

http://tinyurl.com/2z6gmc

You can probably figure out how to adjust it to work for you.

Biff

"Hosley" wrote in message

oups.com...

Hi there,


I want to take a matrix of data (e.g. 89 columns wide and 89 rows
wide), and order it all into one single column, where they data
currently in column B would follow all of the data currently in column
A, and so on. Currently I am simply cutting and pasting. Is there an
easier way to do this? I've tried making a macro for it but the one
made doesn't work. Any ideas?


Thanks,


Hos



I think it worked! I used the code at http://tinyurl.com/2z6gmc.
Would you mind confirming the steps I took? I've never used Visual
Basic before, but I kind of guessed:

1. I copy and pasted the code:

Sub test()
Dim i As Long

For i = 2 To 86
Range(Cells(1, i), Cells(13, i)).Cut _
Cells(Rows.Count, 1).End(xlUp)(2, 1)
Next i

End Sub

2. Since my matrix is 89 X 89, I changed "For i = 2 To 86" to "For i =
2 To 89" and "Range(Cells(1, i), Cells(13, i)).Cut _" to
"Range(Cells(1, i), Cells(89, i)).Cut _"

3. It appears to work but it is difficult to double check. Also it
would be nice to have a general program that does not need specific
matrix size numbers. I'm guessing that this is what PY& Associates
(thanks for your help too!) provided, but I don't know to add this
code to Visual Basic.

Thanks!

Hos



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Converting a matrix of data into a single column

I've never used Visual Basic before, but I kind of guessed

I do a lot of guessing myself!

Yes, you did it correctly.

And yes, PY is not hardcoding how many rows are involved.

Biff

"Hosley" wrote in message
oups.com...
On Apr 18, 10:58 pm, "T. Valko" wrote:
See this:

http://tinyurl.com/2z6gmc

You can probably figure out how to adjust it to work for you.

Biff

"Hosley" wrote in message

oups.com...

Hi there,


I want to take a matrix of data (e.g. 89 columns wide and 89 rows
wide), and order it all into one single column, where they data
currently in column B would follow all of the data currently in column
A, and so on. Currently I am simply cutting and pasting. Is there an
easier way to do this? I've tried making a macro for it but the one
made doesn't work. Any ideas?


Thanks,


Hos



I think it worked! I used the code at http://tinyurl.com/2z6gmc.
Would you mind confirming the steps I took? I've never used Visual
Basic before, but I kind of guessed:

1. I copy and pasted the code:

Sub test()
Dim i As Long

For i = 2 To 86
Range(Cells(1, i), Cells(13, i)).Cut _
Cells(Rows.Count, 1).End(xlUp)(2, 1)
Next i

End Sub

2. Since my matrix is 89 X 89, I changed "For i = 2 To 86" to "For i =
2 To 89" and "Range(Cells(1, i), Cells(13, i)).Cut _" to
"Range(Cells(1, i), Cells(89, i)).Cut _"

3. It appears to work but it is difficult to double check. Also it
would be nice to have a general program that does not need specific
matrix size numbers. I'm guessing that this is what PY& Associates
(thanks for your help too!) provided, but I don't know to add this
code to Visual Basic.

Thanks!

Hos



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Converting a matrix of data into a single column

On Apr 19, 12:04 am, "T. Valko" wrote:
I've never used Visual Basic before, but I kind of guessed


I do a lot of guessing myself!

Yes, you did it correctly.

And yes, PY is not hardcoding how many rows are involved.

Biff

"Hosley" wrote in message

oups.com...

On Apr 18, 10:58 pm, "T. Valko" wrote:
See this:


http://tinyurl.com/2z6gmc


You can probably figure out how to adjust it to work for you.


Biff


"Hosley" wrote in message


groups.com...


Hi there,


I want to take a matrix of data (e.g. 89 columns wide and 89 rows
wide), and order it all into one single column, where they data
currently in column B would follow all of the data currently in column
A, and so on. Currently I am simply cutting and pasting. Is there an
easier way to do this? I've tried making a macro for it but the one
made doesn't work. Any ideas?


Thanks,


Hos


I think it worked! I used the code athttp://tinyurl.com/2z6gmc.
Would you mind confirming the steps I took? I've never used Visual
Basic before, but I kind of guessed:


1. I copy and pasted the code:


Sub test()
Dim i As Long


For i = 2 To 86
Range(Cells(1, i), Cells(13, i)).Cut _
Cells(Rows.Count, 1).End(xlUp)(2, 1)
Next i


End Sub


2. Since my matrix is 89 X 89, I changed "For i = 2 To 86" to "For i =
2 To 89" and "Range(Cells(1, i), Cells(13, i)).Cut _" to
"Range(Cells(1, i), Cells(89, i)).Cut _"


3. It appears to work but it is difficult to double check. Also it
would be nice to have a general program that does not need specific
matrix size numbers. I'm guessing that this is what PY& Associates
(thanks for your help too!) provided, but I don't know to add this
code to Visual Basic.


Thanks!


Hos


Great, thanks!

Hos

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
Plot data from column to matrix Max Excel Discussion (Misc queries) 0 November 29th 06 11:03 AM
Converting a number of rows into a single column Raj Excel Discussion (Misc queries) 10 August 17th 06 11:36 PM
Converting an array of data into a single column Raj Excel Discussion (Misc queries) 0 August 15th 06 09:21 PM
Matrix to single column RD Wirr Excel Worksheet Functions 13 January 4th 06 09:06 PM
Return Single Row of Numeric Data to Single Column Sam via OfficeKB.com Excel Worksheet Functions 4 December 17th 05 12:31 AM


All times are GMT +1. The time now is 05:36 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"