User Tools

Site Tools


faq:remove_character_excel_routine

This is an old revision of the document!


Remove Character Excel Routine

Function cmRemChar(cell1 As Range, char1 As String)

    Dim instr1 As Integer
    Dim tmpStr As String
    
    tmpStr = cell1.Value
    instr1 = InStr(1, tmpStr, char1)
    
    Do While instr1 > 0
        tmpStr = Left(tmpStr, instr1 - 1) & Mid(tmpStr, instr1 + 1)
        instr1 = InStr(1, tmpStr, char1)
    Loop

    cmRemChar = tmpStr
    
End Function
faq/remove_character_excel_routine.1234296252.txt.gz · Last modified: 2009/02/10 12:04 (15 years ago) by cliff