I am trying to abbreviate text in my description column.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a service and product list for a our company. I am trying to
abbreviate the description of the service or product in order to fit it in
our service or product ID Number column. Does anyone have a formula to
preform such tasks. I have of 3000 different items that I need to abbreviate.
 
If you want to abbreviate it to the first 10 characters, for example, use
=LEFT(A1,10)
 
I appreciate the help. Is there a way to the take the first couple letters
in each work of the description?
Example: Description Holly-Blue Maid BB 5'
ID# holblmabb5
 
Antonio said:
.. Is there a way to the take the first couple letters
in each work of the description?
Example: Description Holly-Blue Maid BB 5'
ID# holblmabb5

If you can live with just abbreviating the first letters, eg
in A1: Description Holly-Blue Maid BB 5', result in B1: DHMB5

then one way is to use this fine UDF (FrstLtrs) by Ron Rosenfeld

Here's the extract from Ron's posting to get you going ..

" .. >Hi, I want to extract the 1st letter of each word in a string.
So for eg, in the string "my name is fred" I want to extract "mnif"
....

It's easy with a User Defined Function.
<alt><F11> opens the VB Editor.

Ensure your project is highlighted in the project explorer window, then
Insert/Module and paste the code below into the window.

To use this UDF, enter a formula of the type
=FrstLtrs(A1) where your string is in A1.

'===========
Function FrstLtrs(str As String) As String
Dim temp
Dim i As Long

temp = Split(Trim(str))

For i = 0 To UBound(temp)
FrstLtrs = FrstLtrs & Left(temp(i), 1)
Next i

End Function
'============
--ron ..."


With Ron's UDF implemented in your file,
Place in B1: =FrstLtrs(A1)
Copy down

---
 
Back
Top