Skip to main content

Remove leading apostrophe from numbers in Excel - 4 methods

Author: Xiaoyang Last Modified: 2024-07-08

In Excel, numbers formatted as text are often preceded by a leading apostrophe, which can interfere with data processing and calculations. This common issue arises from importing data from other sources or from misformatted user input. Removing these leading apostrophes is essential for accurate data analysis and manipulation. This guide will explore several methods to remove leading apostrophes from numbers in Excel, including using the built-in Paste as Values feature, Kutools for Excel, the Text to Columns feature, and VBA code, providing you with a variety of tools to ensure your data is correctly formatted.


Remove leading apostrophe from numbers in Excel

Throughout this guide, we'll explore 4 reliable methods to cleanse your data of unwanted apostrophes, enhancing both its accuracy and usability.

Remove leading apostrophe from numbers with paste as values

The Paste as Values function in Excel is a straightforward method for removing leading apostrophes from numbers. 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

Remove leading apostrophe from numbers with Kutools for Excel

Kutools for Excel's Convert between Text and Number utility simplifies the process, allowing you to clean multiple cells quickly without the need for repetitive manual adjustments, making it ideal for handling large datasets efficiently.

After installing Kutools for Excel, follow the steps below to learn how to apply this Convert between Text and Numbers feature.

1. Select the range of cells you want to remove apostrophe from numbers, go to select Kutools > Content > Convert between Text and Number.

2. In the Convert between Text and Number dialog box, select the Text to number option, and then click OK.

doc remove leading apostrophe 9 9

Result

The apostrophe symbols are now removed from selected numbers immediately.

doc remove leading apostrophe 10 10

Download and free trial Kutools for Excel Now !


Remove leading apostrophe from numbers with Text to Column

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.


Remove leading apostrophe from numbers with VBA code

For those who prefer a more automated approach, using VBA (Visual Basic for Applications) code to remove leading apostrophes can offer a customizable and scalable solution. Writing a simple macro can automate the process of stripping out leading apostrophes from numbers, saving time and reducing the potential for human error in large or repetitive datasets.

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.


Effectively removing leading apostrophes from numbers in Excel ensures that your data is not only correct but also usable for calculations and analysis. Each method provided in the post offers unique advantages to suit different needs. By incorporating these techniques into your Excel toolkit, you can streamline your data preparation processes and enhance the reliability of your results, making your Excel workflows more robust and error-free. For those eager to delve deeper into Excel's capabilities, our website boasts a wealth of tutorials. Discover more Excel tips and tricks here.


Demo: Remove leading apostrophe from numbers with Kutools for Excel

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
There are no comments posted here yet
Load More
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations