ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   carriage return code (https://www.excelbanter.com/setting-up-configuration-excel/71382-carriage-return-code.html)

Rusty

carriage return code
 
I imported a list of contacts from outlook. Many of the imported street
addresses have a carriage return followed by a PO box or suite number. I
want to search the street address field and move the text to the left of the
carraige return to another colum. Problem is, I don't know how to search for
the carriage return. Can you help me?

Thanks,

David McRitchie

carriage return code
 
Hi Rusty,

Excel only recognizes CHAR(10) or in VBA CHR(10) which is actually a LF (line-feed)
and in order for it to be effective you must have wrap turned on (format, cells, alignment, wrap text).
When you use Alt+Enter you automatically get wrapping turned on for that cell.

You could have CHAR(13) or in VBA CHR(13) which is CR (carriage-return)

or you could have a combination of the two CRLF it depends on what you were
actually provided.

To look for CHAR(10) using Find, Replace, or Text to Columns you
would hold Alt+0010 or
on a laptop use Fn+Alt+0010 on numeric keypad with NumLock off.
which will produce 1 character that you won't see.

If you don't know what the character that you actually have is you can test
with =CODE(A1) where A1 contains a single character
or with =CODE(MID(A1,15,1)) where the questionable chars is in position 15

If you have 09 as the code it is a TAB character

additional information in
http://www.mvps.org/dmcritchie/rexx/htm/symbols.htm

---
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

"Rusty" wrote in message ...
I imported a list of contacts from outlook. Many of the imported street
addresses have a carriage return followed by a PO box or suite number. I
want to search the street address field and move the text to the left of the
carraige return to another colum. Problem is, I don't know how to search for
the carriage return. Can you help me?

Thanks,






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

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