Remove the apostrophe (') in Excel cell text values

G

Guest

How can I remove the apostrophe (') from the text values in my spreadsheet. I
need to use this spreadsheet to import data into another program which then
gives errors due to the (')
 
N

Norman Jones

Hi Connull,

Copy a blank cell
Select the cells with the offending initial apostrophe
Edit | Paste Special | Check "Value" and "Add" | OK

Perhaps counter-intuitively, this works on text values.
 
G

Guest

Thanks Norman, this option removed the apostrophe from the numeric values but
I am still sitting with the problem of the apostrophe in front of the text
values. If you have any further suggestions I would be most grateful.
 
N

Norman Jones

Hi Connull,

The Copy (blank) | Paste Special | Add process clears leading apostrophes in
text values too - at least this works for me.
 
N

Norman Jones

Hi Connull,

If you want a VBA solution, try:

Sub DeleteApostrophes()
Dim rCell As Range

For Each rCell In ActiveSheet.UsedRange
If rCell.PrefixCharacter = "'" Then
rCell.Value = rCell.Value
End If
Next rCell

End Sub
 
G

Gord Dibben

Connull

One more to look at. Stretching here<g>

If Tools>Options>Transition. "Transition Navigation Keys" is checked you will
see an apostrophe in the cell if left-aligned text.

A ^ sign if center-aligned......a " sign if right-aligned.


Gord Dibben Excel MVP
 

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