+ Reply to Thread
Results 1 to 8 of 8

Programming Line Breaks into Cells

Hybrid View

Guest Programming Line Breaks into... 03-07-2005, 02:06 AM
Guest Re: Programming Line Breaks... 03-07-2005, 02:06 AM
Guest Re: Programming Line Breaks... 03-07-2005, 03:07 AM
Guest Re: Programming Line Breaks... 03-07-2005, 03:07 AM
Guest Re: Programming Line Breaks... 03-08-2005, 02:06 AM
  1. #1
    TheVisionThing
    Guest

    Programming Line Breaks into Cells

    I'm writing resumes from a database field into individual single cells in a
    spreadsheet (one resume per cell). The problem is that line breaks in the
    resumes are not being carried over into the single cells.

    This is the function I'm using to correct this problem, but it's not
    working.
    -----------------------

    Function ConvertTextAreaExcel(strText)
    'inserts line breaks when displaying textarea data in an Excel cell
    If strText <> "" then
    ConvertTextAreaExcel = Replace(strText, chr(13),vbCRLF)
    End If
    End Function
    -----------------------
    Thanks,
    Wayne C.




  2. #2
    R.VENKATARAMAN
    Guest

    Re: Programming Line Breaks into Cells

    did you try something like this
    range("a1")="raja" & chr(10) &"raman"


    chr(10) is equivalent ot alt+ener
    and did you get what you want.


    TheVisionThing <WCressman@etelligence.com> wrote in message
    news:7BRWd.1675$WK2.204@newssvr30.news.prodigy.com...
    > I'm writing resumes from a database field into individual single cells in

    a
    > spreadsheet (one resume per cell). The problem is that line breaks in the
    > resumes are not being carried over into the single cells.
    >
    > This is the function I'm using to correct this problem, but it's not
    > working.
    > -----------------------
    >
    > Function ConvertTextAreaExcel(strText)
    > 'inserts line breaks when displaying textarea data in an Excel cell
    > If strText <> "" then
    > ConvertTextAreaExcel = Replace(strText, chr(13),vbCRLF)
    > End If
    > End Function
    > -----------------------
    > Thanks,
    > Wayne C.
    >
    >
    >




  3. #3
    TheVisionThing
    Guest

    Re: Programming Line Breaks into Cells

    Didn't seem to work.

    If I use 'ConvertTextAreaExcel = Replace(strText, chr(13)."#LINE#")', I see
    '#LINE#' where the lines should be in the resume in the Excel cell.

    But ' ConvertTextAreaExcel = Replace(strText, chr(13),chr(10))' doesn't
    introduce line breaks into the cell.

    Regards,
    Wayne C.




  4. #4
    David McRitchie
    Guest

    Re: Programming Line Breaks into Cells

    Did you turn on Cell wrap Format, cells, alignment, wrap
    Alt+Enter turns on wrap for you.

    Perhaps you have a different character

    Determine if cell is Number or Text and why is it seen that way (#debugformat)
    http://www.mvps.org/dmcritchie/excel...tm#debugformat
    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "TheVisionThing" <WCressman@etelligence.com> wrote in message news:AnSWd.1677$WK2.1185@newssvr30.news.prodigy.com...
    > Didn't seem to work.
    >
    > If I use 'ConvertTextAreaExcel = Replace(strText, chr(13)."#LINE#")', I see
    > '#LINE#' where the lines should be in the resume in the Excel cell.
    >
    > But ' ConvertTextAreaExcel = Replace(strText, chr(13),chr(10))' doesn't
    > introduce line breaks into the cell.
    >
    > Regards,
    > Wayne C.
    >
    >
    >




  5. #5
    TheVisionThing
    Guest

    Re: Programming Line Breaks into Cells

    I've tried everything referenced, but nothing works.

    If I look at the cell using the cell view utility, I don't see a chr(13).
    If I replace chr(13) with "#CR#" I see it in the cell. If I replace chr(13)
    with chr(10), I don't get to see line breaks in the cell. I've also tried
    vbCRLF instead of chr(10).

    --


    ----------------------------------------------------
    This mailbox protected from junk email by MailFrontier Desktop
    from MailFrontier, Inc. http://info.mailfrontier.com

    "David McRitchie" <dmcritchie@msn.com> wrote in message
    news:e4gFYHuIFHA.3928@TK2MSFTNGP09.phx.gbl...
    > Did you turn on Cell wrap Format, cells, alignment, wrap
    > Alt+Enter turns on wrap for you.
    >
    > Perhaps you have a different character
    >
    > Determine if cell is Number or Text and why is it seen that way
    > (#debugformat)
    > http://www.mvps.org/dmcritchie/excel...tm#debugformat
    > ---
    > HTH,
    > David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    > My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    > Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
    >
    > "TheVisionThing" <WCressman@etelligence.com> wrote in message
    > news:AnSWd.1677$WK2.1185@newssvr30.news.prodigy.com...
    >> Didn't seem to work.
    >>
    >> If I use 'ConvertTextAreaExcel = Replace(strText, chr(13)."#LINE#")', I
    >> see
    >> '#LINE#' where the lines should be in the resume in the Excel cell.
    >>
    >> But ' ConvertTextAreaExcel = Replace(strText, chr(13),chr(10))' doesn't
    >> introduce line breaks into the cell.
    >>
    >> Regards,
    >> Wayne C.
    >>
    >>
    >>

    >
    >




  6. #6
    Dave Peterson
    Guest

    Re: Programming Line Breaks into Cells

    Do you see a box where that vblf/chr(10) would be?

    If yes, then you still haven't changed that cell to wordwrap:
    format|cells|alignment tab|wrap text.

    If you don't see a box for that vblf, have you increased the rowheight?

    TheVisionThing wrote:
    >
    > I've tried everything referenced, but nothing works.
    >
    > If I look at the cell using the cell view utility, I don't see a chr(13).
    > If I replace chr(13) with "#CR#" I see it in the cell. If I replace chr(13)
    > with chr(10), I don't get to see line breaks in the cell. I've also tried
    > vbCRLF instead of chr(10).
    >
    > --
    >
    > ----------------------------------------------------
    > This mailbox protected from junk email by MailFrontier Desktop
    > from MailFrontier, Inc. http://info.mailfrontier.com
    >
    > "David McRitchie" <dmcritchie@msn.com> wrote in message
    > news:e4gFYHuIFHA.3928@TK2MSFTNGP09.phx.gbl...
    > > Did you turn on Cell wrap Format, cells, alignment, wrap
    > > Alt+Enter turns on wrap for you.
    > >
    > > Perhaps you have a different character
    > >
    > > Determine if cell is Number or Text and why is it seen that way
    > > (#debugformat)
    > > http://www.mvps.org/dmcritchie/excel...tm#debugformat
    > > ---
    > > HTH,
    > > David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    > > My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    > > Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
    > >
    > > "TheVisionThing" <WCressman@etelligence.com> wrote in message
    > > news:AnSWd.1677$WK2.1185@newssvr30.news.prodigy.com...
    > >> Didn't seem to work.
    > >>
    > >> If I use 'ConvertTextAreaExcel = Replace(strText, chr(13)."#LINE#")', I
    > >> see
    > >> '#LINE#' where the lines should be in the resume in the Excel cell.
    > >>
    > >> But ' ConvertTextAreaExcel = Replace(strText, chr(13),chr(10))' doesn't
    > >> introduce line breaks into the cell.
    > >>
    > >> Regards,
    > >> Wayne C.
    > >>
    > >>
    > >>

    > >
    > >


    --

    Dave Peterson

+ 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