Results 1 to 7 of 7
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    insert a carriage return.. (excel 2000)

    Messaggio cancellato da sal21

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: insert a carriage return.. (excel 2000)

    This seems very consistent. There is a line of 132 hyphens (-), then a space, then the next line. You could look for a pattern such as ---------- plus space and replace that with ---------- plus a CRLF pair plus space.

    It would be cumbersome to load Word just to do that, so as an alternative you could use Replace on a really huge string or you could do a file operation (I don't know the code for that, but I'm sure there is a way, perhaps using VBScripts Regular Expressions object).

    Maybe if you get the original report to only have 131 - characters in a row, it will fix itself?

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: insert a carriage return.. (excel 2000)

    Hi Sal,

    The last thing I would wish to do is sent you away from this forum, but I suspect you might be better off asking your questions in Italian, right?

    Try this site, it is the Italian Microsoft Newsgroup on Excel
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: insert a carriage return.. (excel 2000)

    Now look what you've done! Hope this wasn't because Sal took offence.
    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: insert a carriage return.. (excel 2000)

    From last night's digest:
    <hr>Subject: insert a carriage return.. (excel 2000) [#338805]
    Poster: sal21
    Posted on: 02-Feb-04 21:50

    .. acarriage return.

    This file is generated from an CICS/HOST Application.
    Not all line of this are longer 132.
    I dont know the reason?????

    My problem:

    Count 132 charatter for every line and put a carriage return if many line as to big out of 132 character
    Is pssible whit a macro to make this and end sub and to save as with overwrith the original file or save in another position of Hdisk?
    If you want make also an import in a sheet of excel and make a macro...

    Attachment: <img src=/w3timages/censored.gif alt=censored border=0><hr>
    If you must know. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  6. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: insert a carriage return.. (excel 2000)

    Thanks Jefferson,

    I had seen the original post, so I remembered its gist. Glad you had a copy of the benefit of others though.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: insert a carriage return.. (excel 2000)

    I am sooo glad to see some of us keep record of what's in here <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15> .
    I wouldn't have known what to do with my day today without being able to read Sal's original post, thanks<g>.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

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