+ Reply to Thread
Results 1 to 2 of 2

Convert a cell with CSV to a single column of values using VBA

  1. #1
    Registered User
    Join Date
    11-15-2011
    Location
    St. Louis, MO
    MS-Off Ver
    Excel 2013
    Posts
    69

    Convert a cell with CSV to a single column of values using VBA

    I have a table in Excel with only two rows, the headings in row 1 and the data in row 2. The data in row 2 has Comma Separated Values in it. I need to break the values out of the CSV form into the cells below where they reside. So for instance in cell K2, I have values:
    0.0201,0.0302,0.0403,0.0604,0.0705,0.0806,0.0907,0.1008,0.1209,0.1410,0.1511,0.1612,0.1713,0.1814,0.1915,0.2016,0.2117,0.2218,0.2319,0.2420,0.2521,0.2622,0.2723,0.2824,0.2925,0.3026,0.3127,0.3228
    What I need is for the first value, 0.0201 to be placed in cell K3, the next value, 0.0302 to be placed in cell K4 and so on down the column for all 28 values. I would very much appreciate any help with this issue. Steve
    Last edited by sdingman; 05-23-2013 at 11:27 AM. Reason: Solved

  2. #2
    Registered User
    Join Date
    11-15-2011
    Location
    St. Louis, MO
    MS-Off Ver
    Excel 2013
    Posts
    69

    Re: Convert a cell with CSV to a single column of values using VBA

    I found my own solution at: http://www.anttivaihia.com/blog/2011...ext-rows-excel

    Dim N() As String
    N = Split(ActiveCell, ",")
    ActiveCell.Resize(UBound(N) + 1) = WorksheetFunction.Transpose(N)

    just select the cell and run. Steve

+ 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