Find and replace '

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

Hello, is there a way to search for the apostrophe (') character with the
Find button?

Thanks
 
Am I missing the problem here?
Edit->Find
"Find What" -> '

If you record it as a macro you get ;
Cells.Find(What:="'", After:=ActiveCell, LookIn:=xlFormulas,
LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False) _
.Activate

xl2k
 
If you mean used as the first character in a cell, then that is considered a
formatting character and Find won't find it to the best of my knowledge.
 
Not if the apostrophe is the prefix character. To get around it use VBA:

Sub RemApos()
Dim rngArea As Range
For Each rngArea In ActiveSheet.Cells. _
SpecialCells(xlCellTypeConstants).Areas
rngArea.Value = rngArea.Value
Next
End Sub
 
Using: Edit->Find I am getting "... cannnot find the data..."

Using the macro, I am getting Erorr 91 "Object variable or with block
variable not set",

I can search for anything else but the apostrophe.

Thanks (using Office 2000)
Daniel
 
This is great. Thanks Tim. Thanks also Tom for the explanation.

Daniel
__________________
 
Back
Top