Find/Replace Unshown Apostrophe

G

Guest

I can't find a similar question to this... I am trying to find a way to take
a cell that shows 0 in the cell but in the formula bar, it shows as '0. I
want to be able to strip out the apostrophe so that Excel will recognize the
0 as a number.

I tried the code below but to no avail.

Sub Find_Replace()
Range("AO6:AQ500").Select
Selection.Replace What:=Chr(39), _
Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End Sub

Is it possible to do what I want to do?
 
G

Guest

Select the cells in question and run:

Sub quote_killer()
For Each r In Selection
If r.PrefixCharacter = "'" Then
r.Value = r.Value
End If
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top