Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default splitting one column into rows depending on the data in the column

i have some text data in a single column in the following manner
there is a condition number and some data say d1 d2 d3 d4 ..
d100etc..followed by it(data is also numeric).. the condiotion numbers
are in ascending order..and may vary from 1 to 200..
i want the data to be in different columns( the column number being
the condition number)
and the entris in the column should be the data items (d1 d2 d3...)

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default splitting one column into rows depending on the data in the colum

Something along these lines- assumes condition & data is separated by a blank.

Dim cell As Range, row As Long, col As Integer, data as string
For Each cell In Range("a1:a100") '<== change to your requirements
col = CInt(Left(cell, InStr(1, cell, " ") - 1))
data = Right(cell, Len(cell) - InStr(1, cell, " "))
Cells(row, col) = data ' <=== Set row ?
Next

HTH
" wrote:

i have some text data in a single column in the following manner
there is a condition number and some data say d1 d2 d3 d4 ..
d100etc..followed by it(data is also numeric).. the condiotion numbers
are in ascending order..and may vary from 1 to 200..
i want the data to be in different columns( the column number being
the condition number)
and the entris in the column should be the data items (d1 d2 d3...)


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
Count/Sum rows of a column depending on criteria from drop-down li YY san.[_2_] Excel Worksheet Functions 4 December 22nd 09 01:43 AM
Merge Rows depending on value of the first column sp123 Excel Worksheet Functions 1 April 20th 06 03:43 AM
Color Entire Rows depending on Text in Column A Rashid Khan Excel Programming 3 December 23rd 04 05:06 PM
Insert rows depending on entry in certain column Gareth[_3_] Excel Programming 1 December 12th 03 03:24 AM
Inserting # of rows depending on value in Column Christel Excel Programming 5 November 7th 03 07:57 PM


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