I have a list of products, about 4000 in all. One of the columns is the
description of the product. Can Excel limit the descriptions to 28 characters
by cutting off anything over that number?
Please help!!!!
I have a list of products, about 4000 in all. One of the columns is the
description of the product. Can Excel limit the descriptions to 28 characters
by cutting off anything over that number?
Please help!!!!
Tom,
Two ways:
1) Use data validation. Slect the column, choose Data / Validation...., choose "Allow" = "Text
length", "Data" = "Less than or Equal To", and "Maximum" = 28
2) Use an event: copy the code below, right click on the sheet tab, select view code and paste the
code in the window that appears. As written, it will work with column D.
HTH,
Bernie
MS Excel MVP
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 4 Then Exit Sub
If Len(Target.Value) > 28 Then
Application.EnableEvents = False
Target.Value = Left(Target.Value, 28)
MsgBox "I truncated your entry to 28 characters."
Application.EnableEvents = True
End If
End Sub
"Tom" <[email protected]> wrote in message
news:[email protected]...
>I have a list of products, about 4000 in all. One of the columns is the
> description of the product. Can Excel limit the descriptions to 28 characters
> by cutting off anything over that number?
>
> Please help!!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks