+ Reply to Thread
Results 1 to 2 of 2

splitting one column into rows depending on the data in the column

  1. #1

    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. #2
    Toppers
    Guest

    RE: 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
    "[email protected]" 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1