Truncating trailing Chr(10) in Cell w/ Len() > 256 w/o losing Format ...

J

Joe HM

Hello -

I need to truncate trailing Chr(10)s from a cell that contains more
than 256 characters. The following will not work in that case ...

If Mid(ActiveSheet.Cells(1, 1).Value, Len(ActiveSheet.Cells(1,
1).Value)) = Chr(10) Then
ActiveSheet.Cells(1, 1).Characters(Start:=Len(ActiveSheet.Cells(1,
1).Value), Length:=1).Delete
End If

.... if the cell contains more than that limit. I know that I could
use the Cells().Value to do this but then I would lose all the
formatting within that cell (e.g. bolded words).

Is there any way to do this withoug losing the formatting?

Thanks!
Joe
 

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