Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Truncate Cell text all the time

I have the need to trucate the contents of my cells regardless of
whether or not there is content in the adjoining cell. Can anyone tell
me how to do this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Truncate Cell text all the time

You could use code like the following:

Dim Rng As Range
For Each Rng In Range("A1:A10")
If Len(Rng(1,2).Text) < 0 Then
Rng.Value = Left(Rng.Text,3) ' truncate to 3
characters
End If
Next Rng


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





wrote in message
ups.com...
I have the need to trucate the contents of my cells regardless
of
whether or not there is content in the adjoining cell. Can
anyone tell
me how to do this?



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
how do i truncate text-- create cell with only 125 charecters zahara Excel Worksheet Functions 2 July 5th 06 08:23 PM
How do you truncate a text string? dailygluttony Excel Worksheet Functions 2 March 28th 06 08:08 PM
Truncate text JAmes Excel Programming 6 April 7th 04 01:18 PM
Truncate text Rob van Gelder[_4_] Excel Programming 0 April 6th 04 09:30 PM
truncate text using VBA Excel maehe Excel Programming 2 November 21st 03 12:58 PM


All times are GMT +1. The time now is 03:21 AM.

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

About Us

"It's about Microsoft Excel"