Is it possible to format a cell to keep alpha characters only?

C

Crankn

Example of current cell - 02339 Assinippi ( 781/339 )
Would like to remove all numeric characters.
 
×

מיכ×ל (מיקי) ×בידן

I don't understand what you mean by "FORMAT A CELL" but I would suggest:
1) Type the following User Defined Function into a Module
===============================
Function ExtractNumbers(CL)
For J = 1 To Len(CL)
Txt = Mid(CL, J, 1)
If Asc(Txt) > 64 And Asc(Txt) < 123 Then newtext = newtext & Txt
Next
ExtractNumbers = newtext
End Function
===============
2) Assuming your cell is A1 - in B1 type: =ExtractNumbers(A1)
Micky
 
×

מיכ×ל (מיקי) ×בידן

Well..., it is only for the record that the UDF should be named: ExtractText
instead of: ExtractNumbers
========================
Function ExtractText(CL)
For j = 1 To Len(CL)
Txt = Mid(CL, j, 1)
If Asc(Txt) > 64 And Asc(Txt) < 123 Then newtext = newtext & Txt
Next
ExtractText = newtext
End Function
============
Micky
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top