Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Truncating trailing Chr(10) in Cell w/ Len() 256 w/o losing Format ...

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

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
Keep Losing My Cell Format 2007headache Excel Discussion (Misc queries) 6 May 31st 09 03:11 AM
Cells losing format Charlene Lee[_2_] Excel Discussion (Misc queries) 1 May 11th 09 02:29 AM
Losing Cell Format In Lookup Function Jay Excel Worksheet Functions 1 May 16th 08 08:42 PM
Losing Original Cell Format when pasting in cells mrbill Excel Discussion (Misc queries) 1 December 10th 06 04:10 PM
Trailing Space / Format Question hagen Excel Discussion (Misc queries) 4 December 27th 04 11:01 PM


All times are GMT +1. The time now is 04:58 PM.

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

About Us

"It's about Microsoft Excel"