ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Removing Line Breaks Within a Cell (https://www.excelbanter.com/excel-discussion-misc-queries/450230-removing-line-breaks-within-cell.html)

TimR1316

Removing Line Breaks Within a Cell
 
I have pasted content from a web source into a spreadsheet. One of the cells looks like this:

Concepts Evaluated:
Examining the Status Quo
Explaining the Stakes and the Consequences
Destabilizing the Status Quo

I need it to look like this:

Concepts Evaluated: Examining the Status Quo, Explaining the Stakes and the Consequences, Destabilizing the Status Quo

I tried removing line breaks (alt 010, alt 013, ctrl J) - but that doesn't work. Does anyone have any ideas as to how I might get these cells formatted the way I need them to be? Current formatting is breaking downstream functions.

Thanks!!

Tim

Claus Busch

Removing Line Breaks Within a Cell
 
Hi Tim,

Am Tue, 22 Jul 2014 17:27:13 +0100 schrieb TimR1316:

Concepts Evaluated:
Examining the Status Quo
Explaining the Stakes and the Consequences
Destabilizing the Status Quo

I need it to look like this:

Concepts Evaluated: Examining the Status Quo, Explaining the Stakes and
the Consequences, Destabilizing the Status Quo


rightclick the cell = format cells = Alignment and deaktivate
"WrapText"


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional

TimR1316

Thanks, Claus. I neglected to mention that I had tried that. It looks fine - but my down stream processes still think there's something there causing the line break.

Maybe there's something else causing the downstream problem, but this seems to happen frequently when dealing with text like this. I can normally fix it manually, but there are so many cells like this, it would take me forever to fix them.

Thanks!!

Tim

Quote:

Originally Posted by Claus Busch (Post 1618229)
Hi Tim,



rightclick the cell = format cells = Alignment and deaktivate
"WrapText"


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


TimR1316

I think I figured out how to fix the problem. I opened the .csv file in notepad++. When I did that, I could still see CR and LF characters (even after using wrap text). I was able to remove the CR and LF characters in notepad++ then continue my downstream processing. Not sure if there is a way to do this in Excel - but for now, my problem is resolved. Thanks!!

Quote:

Originally Posted by TimR1316 (Post 1618231)
Thanks, Claus. I neglected to mention that I had tried that. It looks fine - but my down stream processes still think there's something there causing the line break.

Maybe there's something else causing the downstream problem, but this seems to happen frequently when dealing with text like this. I can normally fix it manually, but there are so many cells like this, it would take me forever to fix them.

Thanks!!

Tim


Claus Busch

Removing Line Breaks Within a Cell
 
Hi Tim,

Am Tue, 22 Jul 2014 19:16:37 +0100 schrieb TimR1316:

Maybe there's something else causing the downstream problem, but this
seems to happen frequently when dealing with text like this. I can
normally fix it manually, but there are so many cells like this, it
would take me forever to fix them.


try:

Sub Test()
Application.ScreenUpdating = False
ActiveSheet.UsedRange.WrapText = False
Application.ScreenUpdating = True
End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


All times are GMT +1. The time now is 05:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com