Skip to main content

Remove leading apostrophe from numbers in Excel - 4 methods

Author: Xiaoyang Last Modified: 2024-11-21

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:

right click the cell, choose 123 value from the Paste Options

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

original data arrow right the leading apostrophe is removed

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.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

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.

select the Text to number option in the dialog box

Result

The apostrophe symbols are now removed from selected numbers immediately.

The apostrophe symbols are removed from numbners

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:

click Data > Text to Column, and in the Wizard, click Finish button directly

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:

vba code to select the data range

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.

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
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

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...


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!