+ Reply to Thread
Results 1 to 12 of 12

Notepad to excel problem

  1. #1
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Post Notepad to excel problem

    Hi, I am wondering how would one go about turning a notepad file into an excel file without all the data being lumped into one cell?????

    for example the following notepad file is in this format:

    20060102 190100;139.14;139.2;139.14;139.15;14
    20060102 190200;139.19;139.19;139.16;139.18;16
    20060102 190300;139.19;139.2;139.17;139.17;16
    20060102 190400;139.16;139.24;139.16;139.2;22
    20060102 190500;139.19;139.22;139.19;139.21;7

    and I would like it in an excel file in the same format but with each group of digits seperated by a cell:


    so for example my first line......

    20060102 190100;139.14;139.2;139.14;139.15;14

    I would like 20060102 in its own cell, followed by 190100 in its own cell, followed by
    ;139.14, followed by ;139.15, followed by ;14


    How would I go about doing this???
    Last edited by wowzers; 01-25-2010 at 08:07 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Notepad to excel problem

    with the file open in Excel, select the cells in column A, then click Text to Columns on the Data ribbon.
    in the following dialog select "delimited", click next, tick semicolon and space and click finish.

  3. #3
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Notepad to excel problem

    Quote Originally Posted by teylyn View Post
    with the file open in Excel, select the cells in column A, then click Text to Columns on the Data ribbon.
    in the following dialog select "delimited", click next, tick semicolon and space and click finish.
    Hi teylyn, thank you for your reply.

    Everything worked as planned except that I would like to keep the semicolons that are part of my data as per my example. Is there a way of doing that?

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Notepad to excel problem

    Hi,

    please don't quote whole posts. It's just clutter. There's no need to quote at all if you're responding to the last post directly.

    If you want to keep the semicolons, you need to give Excel another delimiter.

    So, open the text file in Excel,
    click Find and Select on the home ribbon, then Replace
    in the Find what box type a semicolon -- ;
    in the Replace with box type a pipe symbol -- | or an asterisk -- *
    Click Replace all
    Now select all your data in column A, go to the Text to Columns dialog - Delimited - tick space and "Other" and enter the pipe symbol or the asterisk symbol as the other delimiter symbol, depending on what you choose above.

    This will separate your data into a new cell when there is a space or a pipe/asterisk and you will retain the semicolons.

    Does that work for you?

  5. #5
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Notepad to excel problem

    Ok, wouldnt this just be replacing my original delimiter?? So now instead of semicolons I have asteriks's that become delimited........so I still dont understand how this would enable me to retain the semicolons??

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Notepad to excel problem

    Sorry, I was not clear enough above. You want to replace each ; with a *; Then your text will look like this

    20060102 190100*;139.14*;139.2*;139.14*;139.15*;14
    20060102 190200*;139.19*;139.19*;139.16*;139.18*;16
    20060102 190300*;139.19*;139.2*;139.17*;139.17*;16
    20060102 190400*;139.16*;139.24*;139.16*;139.2*;22
    20060102 190500*;139.19*;139.22*;139.19*;139.21*;7

    Then you use text to columns with the delimiters space and asterisk, but not semicolon. This way, the semicolon will be retained.

  7. #7
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Notepad to excel problem

    Yes but isnt that the same thing you told me in the last post???
    I mean by replacing the semicolon with asteriks that means I will no longer have the semicolons that I would like to retain or am i missing something?

    thx

  8. #8
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Notepad to excel problem

    I'm sure I did not mess it up twice. Replace

    ;

    with

    *;

    Do you see the semicolon next to the *? Also in the text example above? When you use text to columns with the * and the space as delimiters on the text above, you will retain the semicolon.

  9. #9
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Notepad to excel problem

    Hi, ok by replacing the semicolon with an asteriks I end up with no semicolons, just asteriks?? (because they have been completely replaced)

    I have followed your instructions and am not retaining the semicolons.

    also, in your example above, wouldnt that be adding the asteriks? (and not replacing the semicolon)?
    Last edited by wowzers; 01-25-2010 at 07:24 PM. Reason: clarication

  10. #10
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Notepad to excel problem

    Hi, i think i have a good idea. I am going to replace the semicolons with 2 semicolons. and then delimit 1one of them thereby leaving the other one....
    should work

  11. #11
    Registered User
    Join Date
    06-05-2009
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Notepad to excel problem

    Hi teylyn, thanks for your help.

    I got your original idea working by looking at your example and trying to replicate it.

    How did I get it to looks like yours? When I replaced the semicolons I had to replace them with an asteriks and a semicolon. Then it was all smooth sailing from there

    woah!
    just saw your last post and realised thats what you told me!!!

    k, i feel dumb now but thanks anyway
    Last edited by wowzers; 01-25-2010 at 08:06 PM. Reason: made mistake

  12. #12
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Notepad to excel problem

    When I replaced the semicolons I had to replace them with an asteriks and a semicolon.
    That's what I've been saying from post #6 onwards. Were you listening at all?

    I am going to replace the semicolons with 2 semicolons
    That will not work. If you select the semicolon as the delimiter, any number of semicolons will be replaced. You need a semicolon and another character, e.g. the *

+ 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