View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Otto Moehrbach[_2_] Otto Moehrbach[_2_] is offline
external usenet poster
 
Posts: 1,071
Default text exceeds allowed number of characters per cell

This little macro will look at every entry in the sheet as it is made, and
if the number of characters exceeds 200, it will put the first 200 in that
cell and the remainder in the cell beneath it. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Len(Target) 200 Then
Target.Offset(1) = Right(Target, Len(Target) - 200)
Target = Left(Target, 200)
End If
End Sub

"majestic357" wrote in message
...
I have 4 cells in a work sheet that I have to type or copy information
into.
This cell always has more than 250 characters. What I wanted to do was
set
up a conditional formatting statement that will turn all text greater than
250 characters red. The cell will allow you to type in and exceed the 250
characters. I can set up a validation to tell me when It exceeds the 250
characters? or, is there a way to stop the data entry at 250 characters
per
cell?
Another option I have thought about but do not know if it will work in
excel
2007. is after 200 characters it pushes the remianing text to the cell
below
it. I am taking suggestions to address this issue.