Search code examples
excelvbaexcel-formulaerror-handlingformat

Remove space between an id number


In column A of my excel workbook, there is 16 digits account number of students of a university. Due to an error when entering the numbers, there is a blank space between the 15th and 16th digits. When we remove this space with find and replace, the account number becomes a scientific number. This problem exists even when the text format is selected for the column. How can I remove the space without changing the account number?


Solution

  • To use identifiers which look like numbers (and use the digits only), use the solution below. Generally, this solution is not directly applicable to numbers with the big quantity of significant digits.

    Enter the account number as a text preceding it with the apostrophe:

    '0123456789012345
    

    Doing this way, you will be able to store the leading zeros as well.

    The value entered by such way displays without the apostrophe.