Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Joe Joe is offline
external usenet poster
 
Posts: 476
Default How to manipulate an 2D Array into a Column Array?

I have an array containing text words which are in a readable narrative.
The array is A1:CH13 (86 columns X 13 rows) a total of 1118 cells.

The text words read down the column A: (A maximum of 13)
then onto the next column B: which is the beggining of the next line and so
on.

However not all the cells in a given column of 13 are filled up with words.
That is, there are blanks at the end of some lines (columns)

Without using drag and drop 85 times how can I move all the columns
sequentially
into the A: column array so that it is still readable down the row and there
are no blank cells inbetween. The final array should end up A1:A??? where
A??? is < A1118
  #2   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default How to manipulate an 2D Array into a Column Array?

save a copy of your workbook as a backup, and with whatever sheet you want
modified as the active sheet try:

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


If you are new to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
http://www.mvps.org/dmcritchie/excel/install.htm

"Joe" wrote:

I have an array containing text words which are in a readable narrative.
The array is A1:CH13 (86 columns X 13 rows) a total of 1118 cells.

The text words read down the column A: (A maximum of 13)
then onto the next column B: which is the beggining of the next line and so
on.

However not all the cells in a given column of 13 are filled up with words.
That is, there are blanks at the end of some lines (columns)

Without using drag and drop 85 times how can I move all the columns
sequentially
into the A: column array so that it is still readable down the row and there
are no blank cells inbetween. The final array should end up A1:A??? where
A??? is < A1118

  #3   Report Post  
Posted to microsoft.public.excel.misc
Joe Joe is offline
external usenet poster
 
Posts: 476
Default How to manipulate an 2D Array into a Column Array?

Thanks JMB.
I tried it and it works.
Looks like I will have to learn Visual Basic macros.I was dreading it and
putting it off.

"JMB" wrote:

save a copy of your workbook as a backup, and with whatever sheet you want
modified as the active sheet try:

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


If you are new to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
http://www.mvps.org/dmcritchie/excel/install.htm

"Joe" wrote:

I have an array containing text words which are in a readable narrative.
The array is A1:CH13 (86 columns X 13 rows) a total of 1118 cells.

The text words read down the column A: (A maximum of 13)
then onto the next column B: which is the beggining of the next line and so
on.

However not all the cells in a given column of 13 are filled up with words.
That is, there are blanks at the end of some lines (columns)

Without using drag and drop 85 times how can I move all the columns
sequentially
into the A: column array so that it is still readable down the row and there
are no blank cells inbetween. The final array should end up A1:A??? where
A??? is < A1118

  #4   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default How to manipulate an 2D Array into a Column Array?

You're welcome.

"Joe" wrote:

Thanks JMB.
I tried it and it works.
Looks like I will have to learn Visual Basic macros.I was dreading it and
putting it off.

"JMB" wrote:

save a copy of your workbook as a backup, and with whatever sheet you want
modified as the active sheet try:

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


If you are new to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
http://www.mvps.org/dmcritchie/excel/install.htm

"Joe" wrote:

I have an array containing text words which are in a readable narrative.
The array is A1:CH13 (86 columns X 13 rows) a total of 1118 cells.

The text words read down the column A: (A maximum of 13)
then onto the next column B: which is the beggining of the next line and so
on.

However not all the cells in a given column of 13 are filled up with words.
That is, there are blanks at the end of some lines (columns)

Without using drag and drop 85 times how can I move all the columns
sequentially
into the A: column array so that it is still readable down the row and there
are no blank cells inbetween. The final array should end up A1:A??? where
A??? is < A1118

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
Array: Counting multiple values within array Trilux_nogo Excel Worksheet Functions 4 April 16th 07 03:12 AM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
combining cells and array from different sheets into an array to pass to IRR() [email protected] Excel Discussion (Misc queries) 3 September 11th 06 07:17 AM
Use array to return array of values Brad Excel Worksheet Functions 2 March 30th 06 05:58 PM
Goal Seek On Members of an Array within Array LostInVBA Excel Worksheet Functions 1 June 27th 05 11:01 PM


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