Deleting LF Characters in cells

B

BillH

I am pasting SQL query output information from a web page (no http
address available) into excel 2003. Each of the cells from the SQL
data is padded with a trailing LF (hex 0A) non-displayable "blank".
How do I remove these characters. I've tried selecting alt-0010 and
Char(10) in the find-replace dialog but excel says it can't find what
I'm looking for. The worksheet columns all have data of varying
lengths, so I can't use text-cols. I just need to remove the x'0A'
characters. My imported data sometimes contains several thousand rows
of multiple columns.
 
G

Gary''s Student

Edit > Replace >
in the Find What field touch CNTRL-j
then touch Replace All
 
B

BillH

Edit > Replace >
in the Find What field touch CNTRL-j
then touch Replace All
--
Gary''s Student - gsnu200774





- Show quoted text -
Thanks,
I tried that also, but the dialog still says it can't find the data
I'm searching for. I can manually edit each cell and delete the
training character, but haven't found a way to automate the process
within Excel.
 
D

Dave Peterson

Did you change uncheck the "match entire cell contents" box?

Are you sure that the character is really a linefeed? If it is, then ctrl-j
should work fine.

If it's not, then Chip Pearson has a very nice addin that will help determine
what that
character(s) is:
http://www.cpearson.com/excel/CellView.htm

=code(right(a1,1))
may help you determine that character if it's really the last character.
 
G

Gord Dibben

Hex 0A is definitely the CHAR(10) linfeed character so don't know why Excel
won't find it.

Are you sure it is Hex 0A?

There are others similar like CHAR(13) which is Hex 0D

Download Chip Pearson's CellView add-in to see what is in the cells.

http://www.cpearson.com/excel/CellView.aspx


Gord Dibben MS Excel MVP
 
B

BillH

Did you change uncheck the "match entire cell contents" box?

Are you sure that the character is really a linefeed?  If it is, then ctrl-j
should work fine.

If it's not, then Chip Pearson has a very nice addin that will help determine
what that
character(s) is:http://www.cpearson.com/excel/CellView.htm

=code(right(a1,1))
may help you determine that character if it's really the last character.






--

Dave Peterson- Hide quoted text -

- Show quoted text -

Using that code it says the character is '160'. I have used an
external hex editor and it said the character is an x'0A'. Now I'm
even more confused.
 
B

BillH

Using that code it says the character is '160'.  I have used an
external hex editor and it said the character is an x'0A'.  Now I'm
even more confused.- Hide quoted text -

- Show quoted text -

I tried Find Alt-0160 and replaced with blank and it worked! Thanks
all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top