How to replace the character "?" in a cell??

fulltime

Registered User.
Local time
Tomorrow, 05:20
Joined
Mar 24, 2006
Messages
56
I read from VB help file that to replace question mark, "?", we enclose it in brackets since "?" is a special character. However, i tried (?) or [?] but it cant work?

Anyone can help??

Thks

FT:)
 
Hi, FT,

maybe just do what is written in the help files?
Code:
Option Explicit

Sub FT()
Dim lngCounter As Long
Dim strValue As String
strValue = ActiveCell.Value
For lngCounter = 1 To Len(ActiveCell.Value)
  If Mid(ActiveCell.Value, lngCounter, 1) Like "[?]" Then
    Mid(strValue, lngCounter, 2) = "FT"
    ActiveCell.Value = strValue
  End If
Next lngCounter
End Sub
Ciao,
Holger
 
=substitute(a1,"?","")
 

Users who are viewing this thread

Back
Top Bottom