Skip to main content

How to remove leading apostrophe from numbers in Excel?

doc remove leading apostrophe 1

Supposing you have a list of numbers which are preceded by a hidden apostrophe, and the apostrophe only be seen in the Formula bar when you select the cell as following screenshot. And now, you want to remove the leading apostrophe from the cell value. To remove them one by one will spend much time, here, I will talk about some quick tricks for solving this problem.

Remove leading apostrophe from numbers with paste as values

Remove leading apostrophe from numbers with Text to Column

Remove leading apostrophe from numbers with VBA code

Remove leading apostrophe from numbers with Kutools for Excel


You can use a simple feature – paste as values to finish this task, please do as follows:

1. Select the data range that you want to remove the leading apostrophe, and press Ctrl + C to copy them.

2. Then click one cell where you want to put the result, and right click, then choose 123 value from the Paste Options, see screenshot:

doc remove leading apostrophe 2

3. And you can see the leading apostrophe has been removed from the numbers.

doc remove leading apostrophe 4  2 doc remove leading apostrophe 5

In Excel, the Text to Column function also can help you to solve this task.

1. Select the data range that you want to remove the leading apostrophe.

2. Then click Data > Text to Column, and in the Convert Text to Columns Wizard, click Finish button directly, see screenshot:

doc remove leading apostrophe 6

3. And now, you will find all the leading apostrophes have been removed from the numbers.


If you are interested in VBA code, I can create a code for you to deal with this task.

1. Hold down the ALT + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Remove leading apostrophe from numbers

Sub remove_Apostrophe()
'Updateby20150521
Dim rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Set WorkRng = WorkRng.SpecialCells(xlCellTypeConstants, xlNumbers)
For Each rng In WorkRng
    If Not rng.HasFormula Then
        rng.Formula = rng.Value
    End If
Next
End Sub

3. Then press F5 key to run this code, and in the popped out prompt box, select the data range that you want to use, see screenshot:

doc remove leading apostrophe 7

4. And then click OK, all the leading apostrophes have been removed from the selected cells.


Kutools for Excel’s Convert between Text and Number utility can help you to convert the numbers formatted as text to normal numbers with one click, and remove the leading apostrophe at the same time.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 30 days

After installing Kutools for Excel, please do as follows:

1. Select the data range that you want to use.

2. Click Kutools > Content > Convert between Text and Number, see screenshot:

3. In the Convert between Text and Number dialog box, choose Text to number under the Convert type, then click Ok or Apply button, the selected numbers stored as text have been converted to real numbers, and the leading apostrophes are removed at once. If you want to convert it back, only need to check Number to text in Convert between Text and Number dialog.see screenshots:

doc remove leading apostrophe 9 9  2 doc remove leading apostrophe 10 10

Click to know more about this Convert between Text and Number feature.

Download and free trial Kutools for Excel Now !


Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
didn't work for me. I acutally needed to save a .txt, and find/replace with notepad++. mine were not showing up as a ', but a ?. not at all visible in Excel. thought I would share my experience in case it helps someone else.
This comment was minimized by the moderator on the site
The 2nd option worked for me with some modifications: 1. I had to set the "Text qualifier" to the single quote2. I had to set the "Column data format" (on the next page) to Text
This comment was minimized by the moderator on the site
This is terrific! Thank you so much for providing a simple way to remove a leading apostrophe from a column. It was driving me crazy. Thanks again for all your help.
This comment was minimized by the moderator on the site
Public Sub REMOVE_APOSTROPHE()

Dim R_CELL As Range
Dim TEMP_VALUE As Variant

For Each R_CELL In Selection

TEMP_VALUE = R_CELL.Value
R_CELL.Clear
R_CELL.Value = TEMP_VALUE

Next R_CELL

End Sub
This comment was minimized by the moderator on the site
Thanks for the tip - I used text to columns; great advice thankyou
This comment was minimized by the moderator on the site
When the first two tricks do not work (this was in my case), I found another simple trick. This trick only works when all cells have the same number of characters behind an annoying ' that cannot be removed for whatever reason. 1-insert column next to cells with ' 2- enter into the new column formula "right" referring to cells with ' and insert no. characters after '. 3- Copy cells with formula-result and paste as values in the original column. 4- remove added column with formula.
This comment was minimized by the moderator on the site
Thanks, text to column work for me... :-)
This comment was minimized by the moderator on the site
i LOVE THE vba CODE in theory but it didn't work :(
This comment was minimized by the moderator on the site
Do you have any suggestions (preferably VBA) for removing apostrophes after numbers in excel? I have an excel file that takes data from an AutoCAD file and many of the values have one or two apostrophes (denoting feet or inches) but unfortunately this makes it unable to run equations on these cells. I know it is possible using "text to cells" but I was hoping using VBA would be possible.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations