Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing a matrix into one large column


Hi,

Does anyone know how to change a large matrix into one column?

Like this:

abc
abc
abc

into

a
a
a
b
b
b
c
c
c

I am not being to able to solve this puzzle

Jeroen


--
jeroen2
------------------------------------------------------------------------
jeroen2's Profile: http://www.excelforum.com/member.php...o&userid=30863
View this thread: http://www.excelforum.com/showthread...hreadid=505353

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Changing a matrix into one large column

Try:

Option Explicit

Sub Matrix()
Dim wss As Worksheet
Dim wsd As Worksheet
Dim rs As Long ' row src
Dim cs As Long ' col src
Dim rd As Long ' row dest

Set wss = ActiveSheet
Set wsd = ActiveWorkbook.Worksheets.Add ' make new sheet
rs = 1
cs = 1
rd = 1

'assume starts in A1
While wss.Cells(rs, 1) < ""
While wss.Cells(rs, cs) < ""
wsd.Cells(rd, 1) = wss.Cells(rs, cs)
rd = rd + 1
cs = cs + 1
Wend
rs = rs + 1
cs = 1
Wend
Set wss = Nothing
Set wsd = Nothing
End Sub

--
HTHs Martin


"jeroen2" wrote:


Hi,

Does anyone know how to change a large matrix into one column?

Like this:

abc
abc
abc

into

a
a
a
b
b
b
c
c
c

I am not being to able to solve this puzzle

Jeroen


--
jeroen2
------------------------------------------------------------------------
jeroen2's Profile: http://www.excelforum.com/member.php...o&userid=30863
View this thread: http://www.excelforum.com/showthread...hreadid=505353


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing a matrix into one large column


Dear Martin,

Thanks very much for helping.

But I am afraid my limited programming knowledge is not enough to
understand your solution.

So I simply copied it in a macro and runed the macro but it did not
work.

Could you tell me how I should use it?

Jeroen


--
jeroen2
------------------------------------------------------------------------
jeroen2's Profile: http://www.excelforum.com/member.php...o&userid=30863
View this thread: http://www.excelforum.com/showthread...hreadid=505353

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing a matrix into one large column


Yes, it does work.

The mistake was in my datasheet. I have "" in my datasheet and the
macro uses "" to detect the border of the matrix.

A big thanks

You solved a problem which kept me stuck. Now I can analyze my data,

Jeroen


--
jeroen2
------------------------------------------------------------------------
jeroen2's Profile: http://www.excelforum.com/member.php...o&userid=30863
View this thread: http://www.excelforum.com/showthread...hreadid=505353

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
Column multiplied by a matrix StephenT Excel Discussion (Misc queries) 2 February 25th 10 03:17 PM
Making a Matrix into a column....... Alex Rauket Excel Discussion (Misc queries) 4 May 22nd 08 12:01 PM
Changing large amount of Data glnbnz Excel Discussion (Misc queries) 5 January 12th 07 07:44 PM
changing the multipling factor on large spreadsheet Office Jnr Excel Discussion (Misc queries) 17 November 12th 06 05:21 PM
Matrix to single column RD Wirr Excel Worksheet Functions 13 January 4th 06 09:06 PM


All times are GMT +1. The time now is 08:54 AM.

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

About Us

"It's about Microsoft Excel"