• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to remove apostrophee ' from the begining of a cell ?

GN0001

Member
Data has come to me as: '00001234 and contact name as 'John.

I need to remove the apostrophe or ' from the beginning of my text.

I tried Right, Len, code and substitute, clean, trim function and they didn't work.

I formatted the column as a text....

any help?

GGGGG
 
Did you try Ctrl+F. search & replace ' (apostrophe) with none then enter.


Should do the job w/o any formula !
 
Yes, I did, it didn't work.

However I found the answer.

=TRIM(SUBSTITUTE(A1, CHAR(160), " "))

But I am looking for easier solution, because each column of the worksheet has ' sign. I have to go to each column one by one to remove this character. It is time consuming.

Do you have any other solution?

Thanks,

GGGGG
 
You can do text to columns.


1. Select the column.

2. Choose "Text to columns"

3. Choose "Delimited"

4. Deselect / un-check all delimiting options.

5. Finish text to columns.


If this works for you then you can record macro for this and loop through all columns!
 
Hello Shrivallabha,

I did this, but it didn't work.

I went to clear format, the apostrophe was taken away. However one solution doesn't work in all scenarios.

Regards,

GGGGG
 
Hello Shrivallabha,

what you say didn't work. I used clear format and it took all the apostrophe sign out.

But this solution may not work for all the cases. Thank you for the help and your time.

GGGGG
 
you can try

[pre]
Code:
Sub RemoveApostrophes()
With Worksheets("Sheet1").UsedRange
.Value = .Value
End With
End Sub
[/pre]
 
Changed sheet1 to activesheet as I don't know the name of your sheet :)

[pre]
Code:
Sub RemoveApostrophes()
With ActiveSheet.UsedRange
.Value = .Value
End With
End Sub
[/pre]
 
Back
Top