
Use a user-defined function to delete all
letters in specified cells
With this tip you can easily delete all letters of specified cells.
Doing so manually would take a long time with a large list, but you
can automate this process with a user-defined function. Copy the
table shown in Figure 13-9 to a new worksheet, create the
user-defined function, and test it.
4
To delete all letters in specified cells:
1. Press <Alt+F11> to open the Visual Basic Editor.
2. From the Insert menu, click Module.
3. Type the following function:
Function LetterOut(rng As Range)
Dim i As Integer
Fori=1ToLen(rng)
Select Case Asc (Mid(rng.Value, i, 1))
Case 0 To 64, 123 To 197
LetterOut ...