Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default 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 wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default 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" wrote in message m...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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" wrote in message
...
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" wrote in message
m...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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" wrote in message
...
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" wrote in message
m...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing line breaks into separate cells JaneA28206 Excel Discussion (Misc queries) 3 October 27th 09 01:37 PM
how do I remove line breaks from several cells? JR Excel Discussion (Misc queries) 3 May 15th 09 03:20 AM
Removing Manual Line Breaks in Multiple Cells Jules Excel Discussion (Misc queries) 2 January 30th 09 08:09 PM
Line Breaks in cells - Mac OS X Leopard plunkettphoto Excel Discussion (Misc queries) 1 August 7th 08 08:34 PM
Line breaks in my cells... AkelA Excel Discussion (Misc queries) 3 October 3rd 07 07:18 PM


All times are GMT +1. The time now is 03:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"