Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this routine
Public Sub Strip_Pick() Dim myRange As Range Dim Cell As Range Dim myStr As String Dim i As Integer With Application .ScreenUpdating = False .Calculation = xlManual End With On Error Resume Next Set myRange = Range(ActiveCell.Address & _ "," & Selection.Address) _ .SpecialCells(xlCellTypeConstants) If myRange Is Nothing Then Exit Sub If Not myRange Is Nothing Then For Each Cell In myRange myStr = Cell.Text For i = 1 To Len(myStr) If Not (Mid(myStr, i, 1)) Like "[0-9a-zA-Z]" Then myStr = Left(myStr, i - 1) & " " & Mid(myStr, i + 1) End If Next i Cell.Value = Application.Trim(myStr) Next Cell With Application .Calculation = xlAutomatic .ScreenUpdating = True End With End If End Sub Gord On Mon, 5 Dec 2005 11:45:16 -0600, Scorpvin wrote: Gord, I'm not very familiar with VB. How do I get a space to replace the unwanted character in your statement? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
removing pre-set characters from comments | Excel Worksheet Functions | |||
Removing Non-Numeric Characters | Excel Discussion (Misc queries) | |||
Removing text characters | Excel Worksheet Functions | |||
Removing blank characters ? | Excel Discussion (Misc queries) | |||
removing some of the characters from a cell | Excel Discussion (Misc queries) |