apostrophe

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do you remove the apostrophe in a cell? I have numbers and text imported
from another program.
 
Hi Dana,

One way:

Sub DeleteApostrophes()
Dim rCell As Range
Dim Rng As Range

Set Rng = ActiveSheet.UsedRange '<<=== CHANGE

For Each rCell In Rng
If rCell.PrefixCharacter = "'" Then
rCell.Value = rCell.Value
End If
Next rCell
End Sub

If you do not wish the procedure to operate on the whole sheet. you should
set Rng to an appropriately restricted range.
 
Dana

If your numbers appear as '1234

Copy a blank cell formatted to General.

Select your cell with '1234 and Paste Special>Add>OK>Esc.

Also works on pure text such as 'Dana

Gord Dibben Excel MVP
 
If you have them in a column, simply select the column,
And <Data> <TextToColumns> <Finish>
And you're done!
 
Select the Cell with apostrophe use the find and replace
function.
Replace apostrophe with "blank"
 

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

Back
Top