Excel - How can I remove hidden apostrophe in Excel?
Asked By JimMober
14-Feb-07 01:00 PM
Hi,
I have a spreadsheet of data and a number of the columns have data that is
preceeded by a hidden apostrophe. The apostrophe can only be seen when you
click on the cell. I have looked and can't find a post that addresses this.
Can anyone out there tell me how to remove this. I have tried using the trim
function in conjuction with the clean function and it didn't work. Ack!
CLEAN
(1)
LEFT
(1)
Excel
(1)
Range
(1)
Error
(1)
Nozza replied...
On Wed, 14 Feb 2007 10:00:38 -0800, Jim Moberg
If the cells are all numbers, then add 0 to them in a new column.
This will convert the string 7 to a numeric 7.
eg If A1 is equal to '7 then in cell B1 use the formula =A1+0
HTH
Noz
--
Email (ROT13)
abmmn_jnyrf4@lnubb.pb.hx
Gord Dibben replied...
Is the apostrophe visible only in the formula bar?
The CLEAN function works for me.
=CLEAN(A1) then copy>paste special>values>ok>esc.
Another thought, if you have Tools>Options>Transition>Transition Navigation Keys
options checkmarked, you could be seeing the Lotus alignment mark.
' for left aligned
^ for centered
Gord Dibben MS Excel MVP
On Wed, 14 Feb 2007 10:00:38 -0800, Jim Moberg
Bill Ridgeway replied...
The ' formats the cell to align left. You may also see carat ^ (not sure
about correct spelling) which centres text and " which aligns text to the
right. You can't delete it and there's nothing to worry about.
Regards.
Bill Ridgeway
Computer Solutions
JimMober replied...
I did try that and it did not work for me.
JimMober replied...
It looks like I found the solution. I saved the file as a csv file type and
after I brought it into excel again I did not see the apostrophe.
Dave Peterson replied...
Is a macro ok?
Option Explicit
Sub testme()
Dim myRng As Range
Dim myCell As Range
Set myRng = Nothing
On Error Resume Next
Set myRng = Intersect(Selection, _
Selection.Cells.SpecialCells(xlCellTypeConstants))
On Error GoTo 0
If myRng Is Nothing Then
MsgBox "No constants in selection!"
Exit Sub
End If
For Each myCell In myRng.Cells
If myCell.PrefixCharacter <> "'" Then
myCell.Value = "'" & myCell.Text
End If
Next myCell
End Sub
Select a range and try it out.
If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Dave Peterson
Lori replied...
You could also try selecting a column and then Data > Text to columns
Karen Ellis replied...
This formula worked like a charm for me:
=VALUE(cell containing apostrophe)
Then you can copy, paste special, and click Values to replace the cells containing apostrophes.
DILipande replied...
Hi, you can multiply those value by 1 which containes hidden apostrophe.
After doing this you can have those value moved to right side of the cell and
you can see that hidden apostrophe no more is there in the cell. thanks
--
Dilip Kumar Pandey
MBA, BCA, B.Com(Hons.)
dilipandey@yahoo.com
dilipandey@gmail.com
New Delhi, India
Rick Rothstein \(MVP - VB\) replied...
You can remove the apostrophes from numerical values directly. Select the
cells in column, click Data/Text To Columns on Excel's menu bar and then
click the Finish button. If you have more than one column with your "text
numbers", then you will have to do the above column-by-column one-at-a-time.
Rick
Bill Crighton replied...
There may be better methods but my fix is to copy a cell that does not have the apostrophe, then paste special the cells I want to remove the apostrophe from and select format. Thats it!
ShaneDevenshir replied...
Hi,
The solution depends on the type of data:
Suppose it is numbers or dates that have the apostrophe at the beginning:
1. Select an empty cell and choose copy
2. Select all the cells that have the dates or numbers
3. Choose Edit, Paste Special, Add.
If the entries were dates you will need to format them as dates.
Suppose the data is text and is located in A1:A100
1. In an empty cell enter the formula
=LEFT(A1,10^10) the 10^10 is overkill but it just makes sure
you get the largest possible text entry.
2. Copy the formula down as far as necessary
3. Select all the formulas and copy them
4. Choose Edit, Paste Special, Values
If this helps, please click the Yes button.
--
Thanks,
Shane Devenshire
RagDyeR replied...
Can't see the entire thread here, but ... for numeric values,
simply open and close TTC.
Select the column of values, then, from the Menu Bar,
--
HTH,
RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================
There may be better methods but my fix is to copy a cell that does not have
the apostrophe, then paste special the cells I want to remove the apostrophe
from and select format. Thats it!
Tom McMillan replied...
That is truly a genius solution... all hail!
Jim Guertin replied to Tom McMillan
I create Excel formulas by adding together text strings and then I copy and paste special values the text formula resulting in the correct numerical formula except it is formated as text (i.e. it has that hidden apostrophe). I then edit the cell and delete the apostrophe, hit return and I have my formula. This type of formula construction can include text and numbers and calculations and anything else you want a formula to have.
However, I wanted to automate a spreadsheet via macros an dbuttons (VBA) and couldn't find a way to make a macro that would remove an apostrophe. Then I looked in this forum and found the ONLY thing that helped (I tried a bunch of them). It was the click on the cell and click Data then Text to columns. By doing the above while recording my key strokes I made a marco that works. Thank you for the idea.
Adrian Horth replied to JimMober
1) Take one cell and delete the single quote mark.
2) Using the format painter, select this cell.
3) Apply the format to all other cells.
Done.
Cheers,
Adrian
Jesse Witt replied to Bill Crighton
This was easy and worked great for both text and numbers. Thanks!
Jesse Witt replied to Bill Crighton
This was easy and worked great for both text and numbers. Thanks!
Jesse Witt replied to Bill Crighton
This was easy and worked great for both text and numbers. Thanks!
Jesse Witt replied to Bill Crighton
This was easy and worked great for both text and numbers. Thanks!
Jesse Witt replied to Bill Crighton
This was easy and worked great for both text and numbers. Thanks!
Jesse Witt replied to Bill Crighton
This was easy and worked great for both text and numbers. Thanks!
surendra bhavanam replied to Adrian Horth
The format painter worked for me......
David Whang replied to Bill Crighton
Bill Crighton,
i created an account just to tell you that the copy blank cell and paste special while keeping format is a genius idea.
THANK YOU SO MUCH!
David Whang replied to Bill Crighton
Bill Crighton,
I created an account JUST to tell you THANK YOU SO MUCH FOR YOUR AWESOME solution.
Best solution found so far.
Klatuvarata replied to JimMober
Well, I think this is probably even more simpler.
Excel --->Tools-->Options-->Transition-->Clear the Transition navigations keys box
Wala! No more hidden formatting chars!
Have a great day!
Add - Trim(Clean()) Excel Hi, I have more than 1000 formulaes in one sheet and to all those formulaes I want to add Trim and Clean function. Is there anyways to add these two functions to all the formulaes. Also if there is any option to use a VB code that would trim and clean all the selected data in spreadshet , this way i could avoid adding those to formulaes already in sheet. Thanks for help. - - SS Excel Programming Discussions ActiveSheet.UsedRange.Cells (1) WorksheetFunction (1) Microsoft Excel (1) Intersect (1) Excel (1) Error (1) WorksheetFunction.Clean (1) Selection.SpecialCells (1) Sub ccc() Dim cell As Range For Each cell In ActiveSheet
Align text in Excel? Excel I am trying to align text in excel, whereby both margins on the left and right are aligned to give my document a clean look on both the right and left side, can I do this in excel? I have merged cells so I can write a blurd, however I'm not finding that I have the option to make it look clean. Thanks, mike Excel Miscellaneous Discussions Excel (1) Page (1) Margins.Check (1) Whereby (1) Blurd
Clean Frame Around Excel Excel Hi. My boss wants to get rid of all the tool bars and frames around excel 2003, like in full screen view. The problem is that he wants excel open on the bottom 2 / 3 of his screen. He is running a powerpoint presentation wondering if there is a way to get rid of the lettering right by the excel icon on the upper left hand corner of excel's window. 2. He also wants to get rid of the cell location window just
Trialing period Excel How do I remove trailing spaces and periods at the end of a phrase in Excel? Excel Discussions Excel (1) Macro (1) TRIM (1) LEFT (1) LEN (1) ShaneDevenshire (1) RightTrim (1) ACarella (1) The Trim() function will clean up both leading and trailing spaces: Example Trim(A1) will turn "cat " (without quotes) into cat". To use it to clean up your data: 1) Insert your formula in the first vacant column. 2) Copy down macro using Microsoft Visual Basic" on the following page http: / / office.microsoft.com / en-us / excel / HP052047111033.aspx Copy and paste the above three lines of codes at step (3) b