+ Reply to Thread
Results 1 to 4 of 4

reformatting a list into separate columns using a macro

  1. #1
    Registered User
    Join Date
    05-05-2013
    Location
    england
    MS-Off Ver
    Excel 2010
    Posts
    4

    reformatting a list into separate columns using a macro

    Well what it is, is that i have been given a list of 186492 little codes and i need to separate them into different columns.
    20070312,2310,1419.25,1419.5,1419.25,1419.5,9,9
    20070312,2320,1419.5,1419.5,1419.25,1419.25,70,70
    20070312,2330,1419.25,1419.25,1419.25,1419.25,50,50
    20070312,2340,1419.25,1419.5,1419,1419.5,121,121
    20070312,2350,1419.5,1419.5,1419.25,1419.5,60,60

    all that needs to be done is in between each comma these numbers need to be put into a column
    the first comma is the date, then time, open, high, low, close, then the other 2

    but as there are nearly 200k of these it is impossible to do by hand. Does anyone have any ideas for a macro that could do this for me?

    Thanks
    Leon
    Last edited by leon1233; 05-05-2013 at 02:35 PM.

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: having trouble writing a macro and i could really do with some help

    Use Texts to Columns, and separate them by commas..
    Cheers!
    Deep Dave

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: having trouble writing a macro and i could really do with some help

    select the column
    Click the Data tab;
    Go to the Data Tools group;
    There you will see the Text to Columns button.
    click it
    choose delimited
    check the comma box
    click finish
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    05-05-2013
    Location
    england
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: having trouble writing a macro and i could really do with some help

    Wow i have been trying to do that for so long and it was so easy thank you for that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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