If you have a limited set of characters to remove, I'd use Replace as follows (Assuming The # is in column B):
************************************************** *****************
dim sValue As String, iRowOn As Long
sValue = Replace(Cells(iRowOn, 2).value, "|", "")
sValue = Replace(sValue, "@", "")
'***Other characters to remove / string manipulations***
Cells(iRowOn, 2).value = sValue
************************************************** *****************
Otherwise you'll have to check character by character as such:
************************************************** *****************
dim iCharOn As Long, sValue As String, sChar as string
For iCharOn = 1 To Len(Cells(iRowOn, 2).Value)
sChar = Mid(Cells(iRowOn, 2).Value, iCharOn, 1)
If Val(sChar) > 0 Or sChar = "0" Then sValue = sValue & sChar
'***Other logic processing of character can be added***
Next
Cells(iRowOn, 2).Value = sValue
************************************************** *****************
Hope one of these helps you.
|